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 pitrou
Recipients alexandre.vassalotti, collinwinter, ggenellina, jakemcguire, jcea, jyasskin, pitrou
Date 2009-02-25.02:11:35
SpamBayes Score 0.0032484403
Marked as misclassified No
Message-id <1235527897.82.0.442250454679.issue5084@psf.upfronthosting.co.za>
In-reply-to
Content
To give an example of what the test could check:

>>> class C(object):
...  def __init__(self):
...    self.some_long_attribute_name = 5
... 
>>> c = C()
>>> c.__dict__
{'some_long_attribute_name': 5}
>>> sorted(map(id, c.__dict__))
[140371243499696]
>>> import pickle
>>> d = pickle.loads(pickle.dumps(c, -1))
>>> d
<__main__.C object at 0x7faaba1b0390>
>>> d.__dict__
{'some_long_attribute_name': 5}
>>> sorted(map(id, d.__dict__))
[140371243501232]

The `sorted(map(id, d.__dict__))` should have been the same before and
after pickling.
History
Date User Action Args
2009-02-25 02:11:38pitrousetrecipients: + pitrou, collinwinter, jcea, ggenellina, alexandre.vassalotti, jyasskin, jakemcguire
2009-02-25 02:11:37pitrousetmessageid: <1235527897.82.0.442250454679.issue5084@psf.upfronthosting.co.za>
2009-02-25 02:11:36pitroulinkissue5084 messages
2009-02-25 02:11:36pitroucreate