[issue38222] pathlib Path objects should support __format__

Eric V. Smith report at bugs.python.org
Thu Sep 19 08:12:56 EDT 2019


Eric V. Smith <eric at trueblade.com> added the comment:

I don't think anyone is suggesting reverting the decision on object.__format__. That decision should stay.

I think the suggestion is to add Path.__format__, which just converts to a string and formats with the given spec.

Unless someone can think of a reason to have a different format specifier language for Path, I think this is a good usability improvement.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38222>
_______________________________________


More information about the Python-bugs-list mailing list