[Python-ideas] os.path.commonprefix: Yes that old chestnut.

Paul Moore p.f.moore at gmail.com
Mon Mar 23 16:24:22 CET 2015


On 23 March 2015 at 14:52, Tal Einat <taleinat at gmail.com> wrote:
> On Sat, Mar 21, 2015 at 1:47 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> On Fri, 20 Mar 2015 21:41:03 -0700 (PDT)
>> Paddy3118 <paddy3118 at gmail.com> wrote:
>>>
>>> The  fix seems clear: deprecate os.path.commonprefix whilst creating a true
>>> os.path.commonpath and str.commonprefix. The deprecated function should
>>> hang around and the standard libs modified to switch to the new function(s)
>>
>> +1 from me.
>
> +1

+1. Maybe adding a commonprefix operation to pathlib would be a good
idea as well - using that would avoid the confusion between the
deprecated os.path.commonprefix and os.path.commonpath...

Paul


More information about the Python-ideas mailing list