This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Arfrever, blokeley, brian.curtin, eric.araujo, giampaolo.rodola, martin.panter, pitrou, r.david.murray, rhettinger, santoso.wijaya, serhiy.storchaka, terry.reedy
Date 2013-11-18.13:18:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384780684.08.0.658440776113.issue11344@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-11-18 13:18:04martin.pantersetrecipients: + martin.panter, rhettinger, terry.reedy, pitrou, giampaolo.rodola, eric.araujo, Arfrever, r.david.murray, brian.curtin, santoso.wijaya, blokeley, serhiy.storchaka
2013-11-18 13:18:04martin.pantersetmessageid: <1384780684.08.0.658440776113.issue11344@psf.upfronthosting.co.za>
2013-11-18 13:18:04martin.panterlinkissue11344 messages
2013-11-18 13:18:03martin.pantercreate