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.

作者 skrah
收信人 mark.dickinson, meador.inge, skrah
日期 2011-09-16.10:33:25
SpamBayes Score 0.0020032607
Marked as misclassified
Message-id <1316169206.38.0.655856343477.issue12974@psf.upfronthosting.co.za>
In-reply-to
内容
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'
>>>
历史
日期 用户 动作 参数
2011-09-16 10:33:26skrah修改recipients: + skrah, mark.dickinson, meador.inge
2011-09-16 10:33:26skrah修改messageid: <1316169206.38.0.655856343477.issue12974@psf.upfronthosting.co.za>
2011-09-16 10:33:25skrah链接issue12974 messages
2011-09-16 10:33:25skrah创建