[Python-Dev] Proposal to revert r54204 (splitext change)

Terry Reedy tjreedy at udel.edu
Thu Mar 15 21:24:25 CET 2007

"Phillip J. Eby" <pje at telecommunity.com> wrote in message 
news: at sparrow.telecommunity.com...

> The process of having warnings at least ensures that I can *discover*
> whether my programs depend on some behavior that has changed - rather 
> than > having something that used to work and now doesn't.

I am not familiar with the warning system, but it seems plausible that one 
could add to the end of .splitext (before it returns) an optional warning 
something like

if not ext and base[0] == '.':
    warn("Before 2.6, this would have returned (%s,%s) instead of (%s,%s)" 
% (ext, base, base, ext))

where base and ext have the obvious contents.  Is this what you want?

Terry Jan Reedy

More information about the Python-Dev mailing list