[docs] [issue9538] Replace confusing pseudoname 'object' in special methods section.

Éric Araujo report at bugs.python.org
Sat Aug 7 23:35:01 CEST 2010

Éric Araujo <merwok at netwok.org> added the comment:

Good catch!

Names listed under language reference section 3.3.1 actually all exist on object, e.g. object.__new__¹. It is section 3.3.2 that lists names that *can* be defined but don’t have a default implementation on object, so +1 on using “someclass” here to be clear. Oh, and let’s change “class” to “someclass” too in the examples under 3.3.4, to use valid syntax and consistent naming.

I think we should not change “the base class”, since even with multiple bases a class still has one most immediate parent, found in cls.__base__ (a.k.a. cls.__bases__[0]).

¹ with the exception of __bool__ and the lack of __reduce{_ex,}__ and __subclasshook__; I’ll open a bug about those.

nosy: +merwok

Python tracker <report at bugs.python.org>

More information about the docs mailing list