Closed ginty closed 4 years ago
@ginty Thanks for the quick PR. What is the difference between _dict
and __dict__
?
@ginty will this fix then enable the same pattern of iteration for regs, memory maps, and address blocks if ported to registers.py
?
I think there is no difference between _dict and dict, but I found a comment somewhere when trying to work out wtf was going on that mentioned that dict was used by Python (to store metadata) so I changed it to avoid clashing with that.
Made no difference though, the missing iter method was the key.
Oh to be back in Ruby land when all something like would take is class Proxy < Hash
This will have no effect on any other iterators, this is purely for the sub_blocks. All the others are implemented in Rust, but sub-blocks are uniquely done in Python because that's where a lot of the user application code will go.
Quick for for issue with sub-block iteration noted in #61 discussion