[Zope3-dev] test failure in checkClassInfo with Python 2.3
Steve Alexander
steve@cat-box.net
Wed, 04 Jun 2003 18:28:29 +0300
>>Hmmm... is TestCase a new-style class in 2.3? Or do classic classes no
>>longer use the dictionary returned by the class suite as their __dict__ in 2.3?
>
> The latter.
The former is true, and acting on it fixed the test.
> The __dict__ attribute of a class returns a read-only
> proxy for the real dict.
That doesn't seem to be the case in Python 2.3b1.
Python 2.3b1 (#1, Jun 4 2003, 16:23:13)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo:
... pass
...
>>> type(Foo)
<type 'classobj'>
>>> class Foo1(object):
... pass
...
>>> type(Foo1)
<type 'type'>
>>> Foo.__dict__
{'__module__': '__main__', '__doc__': None}
>>> type(_)
<type 'dict'>
>>> _ is dict
True
>>>
--
Steve Alexander