[Python-Dev] ',' precedence in documentation]

Nick Coghlan ncoghlan at gmail.com
Mon Sep 15 11:37:54 CEST 2008


Fredrik Lundh wrote:
> Christopher Lee wrote:
>> Can anyone show us "where it is written" in the Python docs that "in"
>> has higher precedence than comma, *and* why there is a good reason
>> that this information should NOT be included in the precedence table?
> 
> because comma is not an operator?  if we were to list everything that
> was not an operator in the precedence table, it would end up being very
> long and mostly pointless.

While it may not make sense to list it in the table itself, having a
note on that page that comma is NOT an operator (unlike C), and hence
only permitted between expressions as part of another statement or
expressions that permits it may not be a bad idea.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
            http://www.boredomandlaziness.org


More information about the Python-Dev mailing list