On Tue, Mar 06, 2007 at 04:07:16PM +0100, "Martin v. L?wis" wrote:
> Oleg Broytmann schrieb:
> > On Tue, Mar 06, 2007 at 04:00:01PM +0100, "Martin v. L?wis" wrote:
> >>> Yes. In .pythonrc.py .pythonrc is the root, and .py is the extension.
> >> Ah, it would do that already: with multiple dots, the last one always
> >> provides the extension.
> >
> > Ah, sorry. I messed it with .split().
>
> Ok - now I'm confused: do you consider this behavior
> (splitext('.pythonrc') == ('', '.pythonrc')) correct
> or not?
I messed this in the sense that I have ran .split('.pythonrc.py'), got
('', '.pythonrc.py') and thought there is a problem. .split() works fine.
Even .splitext() works fine with multiple dots:
>>> os.path.splitext("/bin/.pythonrc.py")
('/bin/.pythonrc', '.py')
but
>>> os.path.splitext(".pythonrc")
('', '.pythonrc')
and I think it should be
('.pythonrc', '')
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com