[Python-Dev] PEP 428 - pathlib API questions
cf.natali at gmail.com
Mon Nov 25 09:12:37 CET 2013
2013/11/25 Greg Ewing <greg.ewing at canterbury.ac.nz>:
> 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.
Just for reference, here's an extract of POSIX basename(1) man page :
basename string [suffix]
The string operand shall be treated as a pathname, as defined in XBD
Pathname. The string string shall be converted to the filename
corresponding to the last pathname component in string and then the
suffix string suffix, if present, shall be removed.
More information about the Python-Dev