Message202332
The previous patch had a wrong mapping between keys and values. The
current implementation of repr means that duplicated keys will be
present when invisible fields are included. See points 2 and 3 in
http://bugs.python.org/issue1820#msg202330 for more explanation.
I have sidestepped that issue by placing invisible fields under the dict argument. This also plays well with the current code in
structseq_new and eval(repr(obj)) works.
The output with the patch is:
$./python -c "import os; print(os.stat('LICENSE'))"
os.stat_result(st_mode=33188, st_ino=577299, st_dev=64512, st_nlink=1, st_uid=33616, st_gid=600, st_size=12749, st_atime=1382696747,
st_mtime=1382361968, st_ctime=1382361968,
dict={'st_atime':1382696747.0, 'st_mtime':1382361968.0,
'st_ctime':1382361968.0, 'st_atime_ns':1382696747000000000,
'st_mtime_ns':1382361968000000000, 'st_ctime_ns':1382361968000000000,
'st_blksize':4096, 'st_blocks':32, 'st_rdev':0}) |
|
Date |
User |
Action |
Args |
2013-11-07 12:45:28 | sunfinite | set | recipients:
+ sunfinite, rhettinger, pitrou, ezio.melotti, eric.araujo, Arfrever, eric.snow, berker.peksag, dlam, pconnell |
2013-11-07 12:45:28 | sunfinite | set | messageid: <1383828328.24.0.17208407036.issue11698@psf.upfronthosting.co.za> |
2013-11-07 12:45:28 | sunfinite | link | issue11698 messages |
2013-11-07 12:45:27 | sunfinite | create | |
|