[Python-ideas] AMEND PEP-8 TO DISCOURAGE ALL CAPS
Eric V. Smith
eric at trueblade.com
Fri Feb 1 14:43:49 EST 2019
On 2/1/2019 1:59 PM, Mike Miller wrote:
>
> On 1/30/19 6:07 PM, David Mertz wrote:
>> On Wed, Jan 30, 2019, 4:23 PM Abe Dillon <abedillon at gmail.com
>> <mailto:abedillon at gmail.com> wrote:
>>
>> Consider thatmath.pi and math.e are constants that are not all
>> caps, have
>> you ever been tempted to re-bind those variables?
>>
>> I generally use 'from math import pi as PI' because the lower case is
>> confusing and misnamed.
>
>
> Another message here reminded me that the datetime classes are not named
> DateTime like they should be. Why not rename them, PI and E too, with
> suitable long-term deprecation period?
Because the hassle involved in making the change, supporting both for a
long time, invalidating tons of working code, invalidating tutorials,
migrating existing pickle files, etc. isn't worth any slight gain in
consistency.
> (As it looks like ALL_CAPS is here to stay.)
Yes, I'd say so.
Eric
More information about the Python-ideas
mailing list