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

Ronald Oussoren ronaldoussoren at mac.com
Tue Mar 20 09:24:43 CET 2007

On 16 Mar, 2007, at 23:37, Stephen Hansen wrote:

> That may actually be a genuinely useful approach:
> splitext(name, ignore_leading_dot=False, all_ext=False)
> ... that's perfect.  I updated my patch to do it that way! :)

I don't agree. "all_ext=True" is won't do the right thing in a  
significant subset of filenames::

        archiveType = os.path.splitext(sourceArchive, all_ext=True)

This won't do what you'd want with most source distributions on the  
internet (product-X.Y.Z.tar.gz).

The ignore_leading_dot argument seems to be there to keep everyone  
happy and furthermore is an argument that will be passed a constant  
value in the majority of usecases (I'd say all uses, but that's just  
asking for someone to come up with a lame counterexample). The  
ignore_leading_dot argument also doesn't buy you anything that can't  
trivially be implemented in other ways.


> --S
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/ 
> ronaldoussoren%40mac.com

More information about the Python-Dev mailing list