[Python-Dev] Pre-PEP: The "bytes" object

Jason Orendorff jason.orendorff at gmail.com
Thu Feb 23 16:25:11 CET 2006


On 2/22/06, Neil Schemenauer <nas at arctrix.com> wrote:
>
>     @classmethod
>     def fromhex(self, data):
>         data = re.sub(r'\s+', '', data)
>         return bytes(binascii.unhexlify(data))


If it's to be a classmethod, I guess that should be "return self(
binascii.unhexlify(data))".

-j
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060223/09dff5c6/attachment.html 


More information about the Python-Dev mailing list