new classes with __slots__ and weakref
Vassilis Virvilis
vasvir at iit.demokritos.gr
Tue Apr 2 06:19:46 EST 2002
Halo,
The following fragment of code is not working as expected
import weakref
class newclass(object):
__slots__ = []
pass
inst = newclass()
prx = weakref.proxy(inst)
print inst
print prx
If you comment out the __slots__ statement it works as expected.
I have found this problem acknowledged in goggle. However I would like
to be informed if there are any recent advances or workarounds.
Thanks for you time.
.Bill
More information about the Python-list
mailing list