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 brett.cannon
Recipients brett.cannon, eric.snow, louielu, ncoghlan, serhiy.storchaka
Date 2017-05-03.16:50:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493830219.51.0.00925181487557.issue30247@psf.upfronthosting.co.za>
In-reply-to
Content
The classes mentioned actually require that the path exist on the file system so there's no extra restrictions. As for cost, it's pretty cheap as a call to _os.fspath() is written in C and does an immediate type-check for str or bytes for the common-case (https://github.com/python/cpython/blob/master/Modules/posixmodule.c#L12099). These classes are also instantiated once typically and then cached so the cost is only paid once per object.

As for use-cases, I've seen people directly instantiate these classes in user code and so supporting paths in a universal way like the rest of the stdlib would be good for consistency.
History
Date User Action Args
2017-05-03 16:50:19brett.cannonsetrecipients: + brett.cannon, ncoghlan, eric.snow, serhiy.storchaka, louielu
2017-05-03 16:50:19brett.cannonsetmessageid: <1493830219.51.0.00925181487557.issue30247@psf.upfronthosting.co.za>
2017-05-03 16:50:19brett.cannonlinkissue30247 messages
2017-05-03 16:50:19brett.cannoncreate