I like this.


From my Android phone on T-Mobile. The first nationwide 4G network.

-------- Original message -------- Subject: Re: [Python-ideas] PEP 428 - object-oriented filesystem paths From: Greg Ewing To: python-ideas@python.org CC:

How about making a path object behave like a sequence
of pathname components? Then

* You can iterate over it directly instead of needing .parents()

* p[:-1] gives you the dirname

* p[-1] gives you the os.path.basename

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas