heh ag

On 12/7/07, Greg Ewing <[EMAIL PROTECTED]> wrote:
>
> Gregory P. Smith wrote:
> > look at the length of a
> > hex pointer in the repr of a class for C pointer size.
>
> I don't think that will work, because the repr only uses
> as many hex digits as it needs to represent the value:
>
> >>> o = object()
> >>> o
> <object object at 0x533b8>
>
> I'm pretty sure my G4 PPC is using pointers longer than
> 20 bits. :-)


heh agreed, it clearly doesn't work everywhere.  I was hoping that all oses
had a high bit set in the virtual addresses they typically use for
processes.  I guess not. ;)

Anyways the struct module is the right answer as Thomas Heller already
pointed out.
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to