data attributes override method attributes?
alex23
wuwei23 at gmail.com
Tue Sep 25 10:11:46 EDT 2012
On Sep 26, 12:08 am, Peter Otten <__pete... at web.de> wrote:
> Jayden wrote:
> > In the Python Tutorial, Section 9.4, it is said that
>
> > "Data attributes override method attributes with the same name."
>
> The tutorial is wrong here. That should be
>
> "Instance attributes override class attributes with the same name."
>
> As methods are usually defined in the class and data attributes are usually
> set in the instance it will look like data override method attributes.
But you can assign attributes on the class, which has the same impact,
so the tutorial is correct.
> No, you're right. Please file a bug report athttp://bugs.python.org
Didn't you just demonstrate the behaviour you're now saying is a bug?
More information about the Python-list
mailing list