add size parameter to conversion methods
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IntelHex |
Fix Released
|
Medium
|
Alexander Belchenko |
Bug Description
See https:/
sneakypete wrote:
To give a quick example:
for addr in range(0, EEPROM_SIZE, BLOCK_SIZE):
The "-1" is messy, and shouldn't be required (and looks a lot like visual basic!).
I agree, it's messy. We can provide a better API (without API break) by introducing additional size parameter. So the example above will be:
for addr in range(0, EEPROM_SIZE, BLOCK_SIZE):
I think it's more readable.
To avoid API break this new parameter should be added after existing ones, e.g. method signature should be:
def tobinarray(self, start=None, end=None, pad=None, size=None):
and we have to check that start is not None and end is None when size is not None.
Related branches
Changed in intelhex: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in intelhex: | |
milestone: | none → 1.3 |
Changed in intelhex: | |
status: | Confirmed → Fix Released |
Changed in intelhex: | |
assignee: | nobody → Alexander Belchenko (bialix) |