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 gvanrossum
Recipients aronacher, docs@python, gvanrossum, ncoghlan, pitrou, serhiy.storchaka, vstinner
Date 2017-11-01.03:14:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509506072.95.0.213398074469.issue18534@psf.upfronthosting.co.za>
In-reply-to
Content
Agreed it's too subtle to change the behavior.

> We may also want to explicitly point out that using os.fsdecode(name) before passing it to open() will ensure that the name attribute is set to a string rather than a bytes object.

Not sure. Are there cases where os.fsdecode() fails even if the binary syscall would succeed? (The docs claim that on Windows it uses 'strict'.)

If it doesn't, maybe we can add a new attribute that gives the name as Text? It could be '' if name is an int.
History
Date User Action Args
2017-11-01 03:14:33gvanrossumsetrecipients: + gvanrossum, ncoghlan, pitrou, vstinner, aronacher, docs@python, serhiy.storchaka
2017-11-01 03:14:32gvanrossumsetmessageid: <1509506072.95.0.213398074469.issue18534@psf.upfronthosting.co.za>
2017-11-01 03:14:32gvanrossumlinkissue18534 messages
2017-11-01 03:14:31gvanrossumcreate