Terry J. Reedy <tjre...@udel.edu> added the comment: I am inclined to -1 also.
a. The proposed behavior is anti-obvious to me: the higher the height, the shorter the result. Calling param 'drop' would be better. b. Not every one-liner should be wrapped. >>> path.rsplit('/',0)[0] '/ggparent/gparent/parent/myfile.txt' >>> path.rsplit('/',1)[0] '/ggparent/gparent/parent' >>> path.rsplit('/',2)[0] '/ggparent/gparent' >>> path.rsplit('/',3)[0] '/ggparent' Note: above gives '' for maxsplit out of range, easily converted to exception in function wrapper. ---------- nosy: +terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11344> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com