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 eric.smith
Recipients eric.smith, pitrou, serhiy.storchaka, tebeka
Date 2019-09-19.08:16:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568880980.88.0.970340257769.issue38222@roundup.psfhosted.org>
In-reply-to
Content
I agree with Serhiy that !s solves the problem. But as a convenience it might be nice to add __format__. This issue pops up from time to time on Path and other types, and I don't think !s is very discoverable. Especially because formatting works with a specifier, but fails with one:

>>> format(path)
'/path/to/enlightenment'
>>> format(path, '>50')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported format string passed to PosixPath.__format__
History
Date User Action Args
2019-09-19 08:16:20eric.smithsetrecipients: + eric.smith, tebeka, pitrou, serhiy.storchaka
2019-09-19 08:16:20eric.smithsetmessageid: <1568880980.88.0.970340257769.issue38222@roundup.psfhosted.org>
2019-09-19 08:16:20eric.smithlinkissue38222 messages
2019-09-19 08:16:20eric.smithcreate