buzzard at invalid.invalid
Sat Nov 1 17:56:37 CET 2014
I have a Bloom filter class and want to (partially) serialize
instances using hex() or oct(). Instances are mutable, so I can't
inherit from long. I thought I'd found the answer when I came across
it doesn't seem to work as I expected it to.
>>> class MyClass(object):
self.val = 7
>>> x = MyClass()
Traceback (most recent call last):
File "<pyshell#76>", line 1, in <module>
TypeError: oct() argument can't be converted to oct
Can someone please explain why my thinking is wrong on this? TIA.
More information about the Python-list