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.

Ronald

>
> --S
>
> _______________________________________________
> 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/ 
> ronaldoussoren%40mac.com

_______________________________________________
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