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

Роман Донченко report at bugs.python.org
Mon Feb 13 20:05:35 CET 2012


New submission from Роман Донченко <DXDragon at 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__ is set to None (but see the next item) <...>.
~

That is not the case:

ActivePython 3.2.2.3 (ActiveState Software Inc.) based on
Python 3.2.2 (default, Sep  8 2011, 10:55:13) [MSC v.1500 64 bit (AMD64)]  
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> len.__self__
<module 'builtins' (built-in)>
>>> open.__self__
<module 'io' (built-in)>
>>> import math
>>> math.sin.__self__
<module 'math' (built-in)>

----------
assignee: docs at python
components: Documentation
messages: 153287
nosy: SpecLad, docs at python
priority: normal
severity: normal
status: open
title: __self__ on built-in functions is not as documented
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14003>
_______________________________________


More information about the docs mailing list