path module / class
Neil Hodgson
nyamatongwe+thunder at gmail.com
Sun Nov 20 19:41:12 EST 2005
Peter Hansen:
>> There is a cost to the change as there will be two libraries that have
>> to be known to understand code.
>
> Could you please clarify? Which two do you mean?
At that point I was thinking about os.path and path.py. Readers will
encounter code that uses both of these libraries.
> We've mandated use of path.py internally for all projects because we've
> noticed (especially with non-expert Python programmers... i.e. junior
> and intermediate types, and senior types new to Python) a decrease in
> errors.
A list of fault reports in this area would be useful evidence. The
relative occurence of particular failures (such as incorrect path
joining) is difficult to estimate which leads to the common messy
handwaving over API choices.
To me, one of the bigger benefits of path.py is that it
automatically uses Unicode strings on Windows NT+ which will behave
correctly in more cases than byte strings.
Neil
More information about the Python-list
mailing list