Georg Brandl on comp.lang.python said:
> It's 2.4.2, on Linux. The 2.5 SVN trunk has the same symptom.
Yes, I confirm this. I think I had done something strange on my system
(probably misspelled something).
--
Alan Franzoni <[EMAIL PROTECTED]>
-
Togli .xyz dalla mia email per contattarmi.
Rrem
Georg Brandl wrote:
> Hi,
>
> can someone please tell me that this is correct and why:
>
> >>> class C(object):
> ... pass
> ...
> >>> c = C()
> >>> c.a = 1
> >>> c.__dict__
> {'a': 1}
> >>> c.__dict__ = {}
> >>> c.a
> Traceback (most recent call last):
> File "", line 1, in ?
> AttributeErr
Georg Brandl <[EMAIL PROTECTED]> wrote:
> [moving to python-dev]
>
> Alex Martelli wrote:
> > Georg Brandl <[EMAIL PROTECTED]> wrote:
> >
> >> can someone please tell me that this is correct and why:
> >
> > IMHO, it is not correct: it is a Python bug (and it would be nice to fix
> > it in 2.5)
[moving to python-dev]
Alex Martelli wrote:
> Georg Brandl <[EMAIL PROTECTED]> wrote:
>
>> can someone please tell me that this is correct and why:
>
> IMHO, it is not correct: it is a Python bug (and it would be nice to fix
> it in 2.5).
Fine. Credits go to Michal Kwiatkowski for discovering t
Georg Brandl <[EMAIL PROTECTED]> wrote:
> can someone please tell me that this is correct and why:
IMHO, it is not correct: it is a Python bug (and it would be nice to fix
it in 2.5).
> >>> class C(object):
> ... pass
> ...
> >>> c = C()
> >>> c.a = 1
> >>> c.__dict__
> {'a': 1}
> >>> c.__di
Alan Franzoni wrote:
> Georg Brandl on comp.lang.python said:
>
> d.__dict__
>> {}
>
> Which Python version, on which system? I can see the properly inserted
> attribute in __dict__, both with old style and new style classes.
It's 2.4.2, on Linux. The 2.5 SVN trunk has the same symptom.
Ge
Georg Brandl on comp.lang.python said:
d.__dict__
> {}
Which Python version, on which system? I can see the properly inserted
attribute in __dict__, both with old style and new style classes.
--
Alan Franzoni <[EMAIL PROTECTED]>
-
Togli .xyz dalla mia email per contattarmi.
Rremove .xyz
Hi,
can someone please tell me that this is correct and why:
>>> class C(object):
... pass
...
>>> c = C()
>>> c.a = 1
>>> c.__dict__
{'a': 1}
>>> c.__dict__ = {}
>>> c.a
Traceback (most recent call last):
File "", line 1, in ?
AttributeError: 'C' object has no attribute 'a'
>>>
>>> class D