[Python-Dev] Python3 regret about deleting list.sort(cmp=...)
Glenn Linderman
v+python at g.nevcal.com
Sun Mar 13 02:47:58 CET 2011
On 3/12/2011 2:09 PM, Terry Reedy wrote:
> I believe that if the integer field were padded with leading blanks as
> needed so that all are the same length, then no key would be needed.
Did you mean that "if the integer field were" converted to string and
"padded with leading blanks..."?
Otherwise I'm not sure how to pad an integer with leading blanks.
Also, what appears to be your revised data structure, strval + ',' +
'%5.5d' % intval , assumes the strval is fixed length, also. Consider
the following strval, intval pairs, using your syntax:
['a,997, 1','a, 1000']
Nothing says the strval wouldn't contain data that look like your
structure... and just because they were short, didn't mean they were
fixed length.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110312/29292f05/attachment.html>
More information about the Python-Dev
mailing list