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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4