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

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Oct 14 06:30:04 CEST 2012


Oscar Benjamin wrote:
> I think it's reasonable to require that
> e.g. os.open() should only accept a str, but standard open()?

Why shouldn't os.open() accept a path object?

Especially if we use a protocol such as __strpath__
so that the os module doesn't have to explicitly
know about the Path classes.

-- 
Greg



More information about the Python-ideas mailing list