[Python-ideas] PEP 428 - object-oriented filesystem paths
Steven D'Aprano
steve at pearwood.info
Sun Oct 14 14:45:42 CEST 2012
On 14/10/12 23:13, Antoine Pitrou wrote:
> Le dimanche 14 octobre 2012 à 14:04 +0200, Yuval Greenfield a écrit :
>>
>> Steven realized what currently happens and was suggesting doing it
>> differently.
>>
>>
>> Personally I really dislike the idea that
>>
>>
>> [i for i in p][0] != p[0]
>>
>>
>> It makes no sense to have this huge surprise.
>
> Again, p[0] just raises TypeError.
Well, that's two people so far who have conflated "p.parts" as just p.
Perhaps that's because "parts" is so similar to "path".
Since we already refer to the bits of a path as "path components",
perhaps this bike shed ought to be spelled "p.components". It's longer,
but I bet nobody will miss it.
--
Steven
More information about the Python-ideas
mailing list