Chris Withers wrote at 2005-10-19 13:53 +0100:
> ...
>from binascii import unhexlify
>def oid_unrepr(oidr):
>     if oidr.startswith('0x'):
>         oidr = oidr[2:]
>     h = unhexlify(oidr)
>     return '\x00'*(8-len(h))+h
>
>def oidr2obj(app,oidr):
>     return app._p_jar[oid_unrepr(oidr)]
>
>First question, would you mind if I added oid_unrepr to ZODB.utils? I 

Why do you not like "p64" (which is already there)?

    p64(0x<hex digits>)

behaves very similar to

    oid_unrepr('0x<hex digits>')



>            - http://www.simplistix.co.uk
>

-- 
Dieter
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to