[Python-ideas] Better stdlib support for Path objects

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Oct 7 20:57:03 CEST 2014


On Mon, Oct 6, 2014 at 7:58 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:

> Not inheriting from built-in classes such as str, list or tuple
> was one of the design points of pathlib. It will not change in the
> future ;-)
>
> PEP 428 outlines this, but you can probably find a more detailed
> discussion in the python-ideas archive.
>

See also rejected PEP 355: "Subclassing from str is a particularly bad
idea; many string
operations make no sense when applied to a path."

http://legacy.python.org/dev/peps/pep-0355/

(I would add that many str operations make no sense - period, so
propagating them into newer designs would be a mistake.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141007/65448e65/attachment.html>


More information about the Python-ideas mailing list