[IronPython] __slots__
Michael Foord
fuzzyman at voidspace.org.uk
Mon Mar 9 14:19:02 CET 2009
Hello guys,
It looks like __slots__ and inheritance are a bit odd in IronPython
(2.0.1). slots.py:
class A(object):
__slots__ = []
class B(A):
__slots__ = []
i = B()
i.test = 3
Running with IronPython and CPython:
C:\compile\resolver-michael>"C:\Program Files (x86)\IronPython
2.0.1\ipy.exe" -D
-X:TabCompletion -X:ColorfulConsole slots.py
C:\compile\resolver-michael>python slots.py
Traceback (most recent call last):
File "slots.py", line 8, in ?
i.test = 3
AttributeError: 'B' object has no attribute 'test'
C:\compile\resolver-michael>
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
More information about the Ironpython-users
mailing list