[Python-Dev] Proposal to revert r54204 (splitext change)
Mike Klaas
mike.klaas at gmail.com
Thu Mar 15 23:09:04 CET 2007
On 3/15/07, Mike Krell <mbk.lists at gmail.com> wrote:
> Here is a point of confusion. Bear in mind I'm running this under
> windows, so explorer happily reports that ".emacs" has a type of
> "emacs". (In windows, file types are registered in the system based
> on the extension -- all the characters following the last dot. An
> unregistered extension is listed as its own type. Thus files ending
> in .txt are listed as type "Text Document", but files ending in
> ".emacs" are listed as type "emacs" because it's an unregistered
> extension.)
Unix-derived files prepended with a dot (like .emacs) are not meant to
be interpreted as a "file type". It may be useful on occasion when
using windows, but it certainly is not the intent of a dotfile.
The following files reside in my /tmp:
.X0-lock
.X100-lock
.X101-lock
.X102-lock
.X103-lock
.X104-lock
.X105-lock
.X106-lock
.X11-unix
.X99-lock
...which are certainly not all unnamed files of different type.
> I often sort files in the explorer based on type, and I want a file
> and all its backups to appear next to each other in such a sorted
> list. That's exactly why I rename the files the way I do.
> Thus, ".1.emacs" is what I want, and ".emacs.1" is a markedly inferior
> and unacceptable alternative. That's what I'm referring to by
> extension preservation.
Unacceptable? You code fails in (ISTM) the more common case of an
extensionless file.
-Mike
More information about the Python-Dev
mailing list