[docs] [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object

Vedran Čačić report at bugs.python.org
Sat Aug 26 09:39:26 EDT 2017

Vedran Čačić added the comment:

It's not hard to find a link. https://docs.python.org/3.7/reference/compound_stmts.html#class-definitions

But trying to change that to incorporate what OP is asking is a wild goose chase. There are numerous instances when a documentation is referring to a builtin. E.g.

(print): All non-keyword arguments are converted to strings like str() does
(repr): this function makes an attempt to return a string that would yield an object with the same value when passed to eval()
(type): The isinstance() built-in function is recommended for testing the type of an object

Of course, all of these must be changed, since they don't work as advertised if you rebind str, eval or isinstance.

I claim this is nonsense. If anything, we should educate people that when documentation refers to "the builtin X", it doesn't mean "whatever is current referrent of builtins.X". Never. Only "__import__" kinda works this way (though not in builtins, but in globals), and that's mostly a historic accident.


Python tracker <report at bugs.python.org>

More information about the docs mailing list