[issue14003] __self__ on built-in functions is not as documented

2020-11-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 ___ Python tracker ___ ___

[issue14003] __self__ on built-in functions is not as documented

2017-03-20 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue14003] __self__ on built-in functions is not as documented

2015-06-07 Thread eryksun
eryksun added the comment: In Python 2 [Py_InitModule4][1] optionally allows setting __self__ on module functions, but no module in the standard library actually uses this. It's always None. This is no longer optional with Python 3's [PyModule_Create][2]. Built-in module functions

[issue14003] __self__ on built-in functions is not as documented

2015-06-07 Thread Dmitry Kazakov
Changes by Dmitry Kazakov jsb...@gmail.com: -- nosy: +vlth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___ Python-bugs-list mailing

[issue14003] __self__ on built-in functions is not as documented

2012-10-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___

[issue14003] __self__ on built-in functions is not as documented

2012-02-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___

[issue14003] __self__ on built-in functions is not as documented

2012-02-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___

[issue14003] __self__ on built-in functions is not as documented

2012-02-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Python-coded functions do not have .__self__. def f(): pass f.__self__ ... AttributeError: 'function' object has no attribute '__self__' Unbound builtin methods, which are simply builtins functions attached to a class, do not have .__self__

[issue14003] __self__ on built-in functions is not as documented

2012-02-17 Thread Matt Joiner
Changes by Matt Joiner anacro...@gmail.com: -- nosy: +anacrolix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___ Python-bugs-list

[issue14003] __self__ on built-in functions is not as documented

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I think that functions in C modules are implemented as methods of module objects, which would explain why len.__self__ is builtins. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue14003] __self__ on built-in functions is not as documented

2012-02-13 Thread Роман Донченко
New submission from Роман Донченко dxdra...@yandex.ru: The language reference says this in section 3.2: ~ Built-in functions A built-in function object is a wrapper around a C function. Examples of built-in functions are len() and math.sin() ... Special read-only attributes: ... __self__

[issue14003] __self__ on built-in functions is not as documented

2012-02-13 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It looks like this changed between 2.x and 3.x but the docs were not updated. None makes more sense than the module as __self__, though, so perhaps it is actually a bug. Then, again, since Python functions don't have a __self__, the

[issue14003] __self__ on built-in functions is not as documented

2012-02-13 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: It's nicer for introspection if __self__ is None on builtin functions. But fixing the docs is easier (and more backwards compatible). -- nosy: +michael.foord ___ Python tracker