New user's initial thoughts / criticisms of Python

Terry Reedy tjreedy at udel.edu
Sun Nov 10 19:13:46 EST 2013


On 11/10/2013 6:29 PM, Chris Angelico wrote:
> On Mon, Nov 11, 2013 at 4:12 AM, Dennis Lee Bieber
> <wlfraed at ix.netcom.com> wrote:
>>>>> -123 .bit_length()
>> -7
>>
>>          No parens needed if a space precedes the .
>
> Heh! I would call that an inferior alternative to the parentheses
> though; it's so unusual to put a space before the dot that I wouldn't
> consider it something to do in normal code. Anyone coming through and
> editing would see it as a mistake to be fixed.

I have only used int methods in interactive exploration, and have always 
used space. I have never used (), but agree that they are better for 
permanent code. The -7 is really nasty (unless one were to actually want 
that).

-- 
Terry Jan Reedy




More information about the Python-list mailing list