[Python-Dev] splitext('.cshrc')

Oleg Broytmann phd at phd.pp.ru
Tue Mar 6 18:05:10 CET 2007

On Tue, Mar 06, 2007 at 08:49:00AM -0800, Ilya Sandler wrote:
> I think it's reasonable to expect that
> splitext( a+"." + b) == (a, .b )
> for any a,b which have no dots in them...

   Except for an empty 'a', in what case 'b' is the name, not the
extension. Well, 'a' cannot be empty because it's the name, but 'b' can be
empty. For ".pythonrc.py" ".pythonrc" is the name and ".py" is the
extension. For ".pythonrc" ".pythonrc" is the name and there is no

     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

More information about the Python-Dev mailing list