[Python-ideas] PEP 428 - object-oriented filesystem paths

Steven D'Aprano steve at pearwood.info
Sun Oct 14 13:21:58 CEST 2012

On 14/10/12 22:03, Antoine Pitrou wrote:
> On Sun, 14 Oct 2012 21:48:59 +1100
> Steven D'Aprano<steve at pearwood.info>  wrote:
>> Ah, I wondered if anyone else had picked up on that. When I read the PEP,
>> I was concerned about the mental conflict between iteration and indexing
>> of Path objects: given a Path p the sequence p[0] p[1] p[2] ... does
>> something completely different from iterating over p directly.
> p[0] p[1] etc. are just TypeErrors:

Ah, my mistake... I didn't register that you sequenced over the parts
attribute, not the path itself. Sorry for the noise.


More information about the Python-ideas mailing list