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 <rep...@bugs.python.org>
<http://bugs.python.org/issue31283>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to