[Python-Dev] splitext('.cshrc')
Josiah Carlson
jcarlson at uci.edu
Thu Mar 8 07:51:18 CET 2007
Andrew Bennetts <andrew-pythondev at puzzling.org> wrote:
>
> Josiah Carlson wrote:
> [...]
> >
> > Offer a new splitext that uses X on posix and Y on win32, but causes a
> > DeprecationWarning with pointers to the two renamed functions that are
> > available on both platforms.
> >
> > For people who want the old platform-specific functionality in previous
> > and subsequent Pythons, offer the ability to disable the
> > DeprecationWarning via a module global; at least until the function is
> > removed in some future Python, at which point path.splitext would cause
> > an AttributeError .
>
> It's not about cross-platform behaviour. It's already the same:
>
> >>> import posixpath, ntpath
> >>> ntpath.splitext('.cshrc')
> ('', '.cshrc')
> >>> posixpath.splitext('.cshrc')
> ('', '.cshrc')
>
> And as I understand it, the current proposal would change this behaviour the
> same way on win32 and POSIX, although I may not have kept up with that part of
> the discussion enough. Is there a genuine desire for this to behave differently
> on different platforms?
Ahh, I thought that it was different on different platforms. Nevermind
then. Add a new function and be done with it.
- Josiah
More information about the Python-Dev
mailing list