This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sunfinite
Recipients Arfrever, berker.peksag, dlam, eric.araujo, eric.snow, ezio.melotti, pconnell, pitrou, rhettinger, sunfinite
Date 2013-11-07.12:45:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383828328.24.0.17208407036.issue11698@psf.upfronthosting.co.za>
In-reply-to
Content
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})
History
Date User Action Args
2013-11-07 12:45:28sunfinitesetrecipients: + sunfinite, rhettinger, pitrou, ezio.melotti, eric.araujo, Arfrever, eric.snow, berker.peksag, dlam, pconnell
2013-11-07 12:45:28sunfinitesetmessageid: <1383828328.24.0.17208407036.issue11698@psf.upfronthosting.co.za>
2013-11-07 12:45:28sunfinitelinkissue11698 messages
2013-11-07 12:45:27sunfinitecreate