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 skrah
Recipients mark.dickinson, meador.inge, skrah
Date 2011-09-16.10:33:25
SpamBayes Score 0.0020032607
Marked as misclassified No
Message-id <1316169206.38.0.655856343477.issue12974@psf.upfronthosting.co.za>
In-reply-to
Content
I just discovered that struct packs pointers from objects with an
__index__() method. Is that intentional?

>>> import struct
>>> class IDX(object):
...     def __init__(self, value):
...         self.value = value
...     def __index__(self):
...          return self.value
... 
>>> struct.pack('P', IDX(9))
b'\t\x00\x00\x00\x00\x00\x00\x00'
>>>
History
Date User Action Args
2011-09-16 10:33:26skrahsetrecipients: + skrah, mark.dickinson, meador.inge
2011-09-16 10:33:26skrahsetmessageid: <1316169206.38.0.655856343477.issue12974@psf.upfronthosting.co.za>
2011-09-16 10:33:25skrahlinkissue12974 messages
2011-09-16 10:33:25skrahcreate