[chirp_devel] [developer] Control address format for full-file dump/diff - #1767

Dan Smith
Tue Jul 15 18:26:37 PDT 2014


> The second thing is that my own preferred format is "both"
> which sort of breaks your model:
>>> out += "%04i x%04X: " % ((i * line_sz), (i * line_sz))

I think you could do this:

  result = fmt % locals()

and then I could make a format like this to get what you want:

  "%(line_sz)04i %(line_sz)04X"

Should be less code than what you have now and more flexible I think.
Just catch ValueError, TypeError, and KeyError and you should be safe
for error handling I think.

--Dan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20140715/a6bba704/attachment-0001.bin 


More information about the chirp_devel mailing list