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

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 6 03:05:41 CEST 2012


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



More information about the Python-ideas mailing list