[docs] [issue32594] File object 'name' attribute inconsistent type and not obviously documented

Stéphane Wirtel report at bugs.python.org
Thu Jan 18 08:58:11 EST 2018


Stéphane Wirtel <stephane at wirtel.be> added the comment:

but I can confirm your issue with 3.6.4+

Python 3.6.4+ (heads/3.6:f31c70b0d6, Jan 18 2018, 14:57:01) 
[GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.stderr.name
'<stderr>'
>>> f = open(sys.stderr.fileno())
>>> f.name
2
>>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32594>
_______________________________________


More information about the docs mailing list