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

Steve Holden steve at holdenweb.com
Fri Mar 16 14:14:12 CET 2007

Martin v. Löwis wrote:
> Patrick Maupin schrieb:
>> The worst part is, if they are relying on that specific behavior and have
>> to rely on the new specific behavior, and want to support old and new
>> versions of Python, they are potentially left with some very unattractive
>> options -- check the Python version to figure out how splitext works, or
>> just roll their own and stop calling splitext entirely, because its behavior
>> is not consistent across versions.
> Somebody has pointed out that it is fairly easy to write a wrapper 
> around splitext that explicitly produces the old behavior on all 
> versions, or the new behavior on all versions, depending on what
> precisely is desired. Users that have coded for a specific behavior
> will have to write a wrapper - whether they explicitly code for the
> old behavior or the new one.
How is forcing people to write such a wrapper better than providing an 
optional argument (defaulting to current behavior) to specify the 
behavior they want?

Presumably people who already care enough to want the patched behavior 
have already written such a wrapper around the current version. This 
should continue to work, albeit with less than exemplary efficiency.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb     http://del.icio.us/steve.holden
Blog of Note:          http://holdenweb.blogspot.com
See you at PyCon?         http://us.pycon.org/TX2007

More information about the Python-Dev mailing list