On 3/7/07, Josiah Carlson <[EMAIL PROTECTED]> wrote:
> "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > Now it's becoming difficult: several people in favor, some opposed...
> What about changing the semantics of splitext and creating a new
> function (available on all platforms) that does what the Windows version
> currently does?

I don't understand only one thing, why do people need new functions?
You can anticipate the change today, and write functions that do
exactly what you need no matter which way (current or proposed) python

def ensurenew(path):
    a,b = os.path.splitext(path)
    if a == '': # also possibly check if a contains dots only
        return b,a
    return a,b

def ensureold(path):
    a,b = os.path.splitext(path)
    if b == '' and a.startswith('.'): # also possibly check if a
starts with multiple dots
        return b,a
    return a,b

Best regards,
Python-Dev mailing list

Reply via email to