Message300878
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. |
|
Date |
User |
Action |
Args |
2017-08-26 13:39:26 | veky | set | recipients:
+ veky, steven.daprano, docs@python, gone |
2017-08-26 13:39:26 | veky | set | messageid: <1503754766.39.0.261487701146.issue31283@psf.upfronthosting.co.za> |
2017-08-26 13:39:26 | veky | link | issue31283 messages |
2017-08-26 13:39:25 | veky | create | |
|