Message144120
| 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:26 | skrah | set | recipients: + skrah, mark.dickinson, meador.inge |
| 2011-09-16 10:33:26 | skrah | set | messageid: <1316169206.38.0.655856343477.issue12974@psf.upfronthosting.co.za> |
| 2011-09-16 10:33:25 | skrah | link | issue12974 messages |
| 2011-09-16 10:33:25 | skrah | create | |