[Python-Dev] Policy Decisions, Judgment Calls, and Backwards Compatibility (was Re: splitext('.cshrc'))
Phillip J. Eby
pje at telecommunity.com
Fri Mar 9 17:22:22 CET 2007
At 08:57 AM 3/9/2007 +0100, Martin v. Löwis wrote:
>In the case that triggered the discussion, the change implemented
>was not an incompatible change, because the new implementation still
>met the old specification (which, of course, was underspecified).
No, it wasn't, actually. Read the doc strings, which state exactly what
the code does.
Windows:
>>> import os
>>> help(os.path.splitext)
Help on function splitext in module ntpath:
splitext(p)
Split the extension from a pathname.
Extension is everything from the last dot to the end.
Return (root, ext), either part may be empty.
Posix:
>>> import os
>>> help(os.path.splitext)
Help on function splitext in module posixpath:
splitext(p)
Split the extension from a pathname. Extension is everything from the
last dot to the end. Returns "(root, ext)", either part may be empty.
More information about the Python-Dev
mailing list