Operator precedence problem
Marko Rauhamaa
marko at pacujo.net
Mon Jun 6 10:55:25 EDT 2016
Random832 <random832 at fastmail.com>:
> On Mon, Jun 6, 2016, at 10:22, Marko Rauhamaa wrote:
>> You *can* assume other people have read the spec. Even more
>> importantly, you can assume the Python interpreter complies with the
>> spec.
>
> I can assume the python interpreter will accept tabs as indents too,
> that doesn't make it good style.
>
> Requiring people to constantly flip between my code and the language
> reference to understand it is also not good style.
I cannot guess at people's familiarity with the spec. In fact, there's
nobody in the world who masters the whole standard library, for example.
That's not a reason to start avoiding parts of the stdlib functions.
BTW, whenever I'm programming Python, I have the stdlib refererence open
next to the editor. Believe me, I keep consulting the spec all the time.
Operator precedence is a small table, of course, and it is not bad style
to assume familiarity with it.
Marko
More information about the Python-list
mailing list