[Python-Dev] PEP 428 - pathlib API questions
greg.ewing at canterbury.ac.nz
Mon Nov 25 00:06:59 CET 2013
Ben Hoyt wrote:
> However, it seems there was no further discussion about why not
> "extension" and "extensions"? I have never heard a filename extension
> being called a "suffix".
You can't have read many unix man pages, then! I just
searched for "suffix" in the gcc man page, and found
For any given input file, the file name suffix determines what kind of
compilation is done:
> I know it is a suffix in the sense of the
> English word, but I've never heard it called that in this context, and
> I think context is important.
This probably depends on your background. In my experience,
the term "extension" arose in OSes where it was a formal
part of the filename syntax, often highly constrained.
E.g. RT11, CP/M, early MS-DOS.
Unix has never had a formal notion of extensions like that,
only informal conventions, and has called them suffixes at
least some of the time for as long as I can remember.
> 4) Is path_obj.glob() recursive? In the PEP it looks like it is if the
> pattern starts with '**',
I don't think it has to *start* with **. Rather, the ** is
a pattern that can span directory separators. It's not a
flag that applies to the whole thing -- a pattern could have
a * in one place and a ** in another.
More information about the Python-Dev