[ZODB-Dev] Weird errors with Zope 2.7.7

Dieter Maurer dieter at handshake.de
Wed Oct 19 15:11:27 EDT 2005


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


More information about the ZODB-Dev mailing list