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 projetmbc
Recipients paul.moore, pitrou, projetmbc
Date 2015-05-06.18:41:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
I don't agree with you. I prefer to add new functionalities to the paths I
use. This is the power of OOP. It is easier and cleaner to use
*mypath.common_with(otherpath)*  than  *common_with(**mypath, **other path)*

Python is highly OOP, so you can't say *"don't use subclassing in your
case"*. As a user, I should have the possibility to use the method I want.

Another example is the use of  *onepath - anotherpath*  instead of
*onepath.relative_to(**another path)* . That's the power of the magic
method to add this kind of feature.

*Christophe BAL*
*Enseignant de mathématiques en Lycée **et développeur Python amateur*
*French math teacher in a "Lycée" **and **Python **amateur developer*

2015-05-06 20:21 GMT+02:00 Paul Moore <>:

> Paul Moore added the comment:
> For that type of function, I'd suggest you use a standalone function
> rather than subclassing and methods or operator overloading. You don't gain
> enough to be worth the complexity of having to subclass path objects. And
> duck typing means that your function works for any subclass of (Pure)Path
> without change.
> ----------
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
Date User Action Args
2015-05-06 18:41:32projetmbcsetrecipients: + projetmbc, paul.moore, pitrou
2015-05-06 18:41:32projetmbclinkissue24132 messages
2015-05-06 18:41:32projetmbccreate