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
implements:

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,
Alexey.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to