R. David Murray <rdmur...@bitdance.com> added the comment:

I believe you are correct that it is too late to modify the existing behavior.  
Too many programs depend on it.  As far as documenting, my point is that it is 
*not specified* what the name attribute contains.  It can contain literally 
anything, depending on the particular file object involved.

Could we document what the open function actually does?  That perhaps we could 
do, since it is likely that other python implementations will want to copy what 
CPython does in this case.  But as you observe, this can also be *system 
dependent*, so it is not completely clear to me exactly how we should do that.  
That is, the description of what actually happens could be so complex that it 
might be better to just say something like "The exact type and value of the 
name attribute is not specified, but when the file is opened via a file system 
path it will almost always be that path as a string.".

I'd be happy for a better answer, though :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32594>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to