Assignment Versus Equality

Gregory Ewing greg.ewing at canterbury.ac.nz
Tue Jun 28 02:59:53 EDT 2016


BartC wrote:
> On 27/06/2016 23:45, Lawrence D’Oliveiro wrote:
> 
>>     FORMAT(...complex expression with lots of nested parentheses...) = 
> 
> You just design the compiler to do the same processing in each case, ie. 
> parse a <name> followed (<expression>), then mark the result AST 
> fragment as either an Array term, or Format statement, depending on what 
> follows, and whether the name is "format".

Except that the contents of FORMAT statements have their
own unique syntax that's very different from that of
argument lists or array indexes. So processing them
both the same way would introduce its own level of
messiness.

Starting all over again from the beginning of the
statement is probably the least messy way to handle it.

-- 
Greg


More information about the Python-list mailing list