[Python-ideas] PEP: Extended stat_result (First Draft)
MRAB
python at mrabarnett.plus.com
Mon May 6 20:11:49 CEST 2013
On 06/05/2013 18:31, Pieter Nagel wrote:
> On Mon, 2013-05-06 at 17:14 +0100, MRAB wrote:
>
>> Some of the names seem too long for me.
>
> Neither my nor your naming preference is relevant here, although I
> personally prefer long names over abbreviations - the time spent writing
> code in infinitesimal compared to the time reading, debugging, extending
> and maintaining it.
>
> But at issue here is which names fit with Guido's vision for the stdlib.
> PEP 8 says "All identifiers in the Python standard library... SHOULD use
> English words wherever feasible (in many cases, abbreviations and
> technical terms are used which aren't English)". This is a bit
> ambiguous, but I understand the parentheses to refer to a practice that
> Guido would like to stopped, by using English words instead.
>
Python has a lot of abbreviations. The os.path module, for example, has
isdir, dirname and splitext.
There are also commonly-used names like len, str and int, and methods
names like lstrip, also reserved words like def and elif.
Because of all that, long names like is_character_device seem
unPythonic, IMHO.
>> Do we really need 2 names for the same thing? No.
>
> So you said twice, but I can not do much with any feedback if it is
> expressed as a mere assertion.
>
> I gave my rationale for doing so in the PEP. If you disagree, please
> give a rationale of your own.
>
Such aliases won't add anything to the language.
If we wanted underscores in such places as isdir, we should probably
have done it in the move from Python 2 to Python 3, along with the
renaming of modules to lowercase. Again, IMHO.
More information about the Python-ideas
mailing list