This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients docs@python, matrixise, r.david.murray, skip.montanaro
Date 2018-01-18.18:15:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516299339.74.0.467229070634.issue32594@psf.upfronthosting.co.za>
In-reply-to
Content
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 :)
History
Date User Action Args
2018-01-18 18:15:39r.david.murraysetrecipients: + r.david.murray, skip.montanaro, docs@python, matrixise
2018-01-18 18:15:39r.david.murraysetmessageid: <1516299339.74.0.467229070634.issue32594@psf.upfronthosting.co.za>
2018-01-18 18:15:39r.david.murraylinkissue32594 messages
2018-01-18 18:15:39r.david.murraycreate