Martin Panter added the comment:

The ntpath.splitpath() version is easy to get lost in. It would probably help 
if you spelt out all the single-letter variable names, and explained that 
tri-state root/separator = None/True/False flag. Maybe there is a less 
convoluted way to write it too, I dunno.

Also, maybe it is worth clearly documenting a couple special properties of the 
result:

* The first element is always the root component (for an absolute path), or an 
empty string (for a relative path)
* The last element is an empty string if the path name ended in a directory 
separator, except when the path is a root directory

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11344>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to