"Martin v. Löwis"
martin at v.loewis.de
Tue Mar 6 22:01:38 CET 2007
Phillip J. Eby schrieb:
> I know I've written code like this that *depends* on the current
> behavior. It's *useful* to classify e.g. .svn directories or .*rc files
> by their "extension", so I'm honestly baffled by the idea of wanting to
> treat such files as *not* having an extension (as opposed to a
> possibly-unrecognized one).
I never considered it an extension. Ask 10 people around you to see
what a leading dot on Unix in a file name means, and I would be
suprised if more than one answered "it separates the file name from
the extension". Most of them likely include "hidden file" in their
answer, and the rest (of those who know anything about it) will
say "dotfiles, not displayed by ls, and not included in globbing".
It really is a *different* dot from the one that separates the file
name from its extension.
I also fail to see why it is useful to invoke splitext on a file name
to find out whether it is .svn - I would rather check the file name
It's unfortunate, of course, that people apparently relied on
this behavior (is the code you are referring to publicly available?
If so, where?)
More information about the Python-Dev