Variable definition

Andreas Waldenburger usenot at geekmail.INVALID
Sat Feb 27 08:45:33 EST 2010


On 27 Feb 2010 03:33:57 GMT Steven D'Aprano
<steve at REMOVE-THIS-cybersource.com.au> wrote:

> exec "'myPrefix_turquoise' = 42"
> 
Not quite:

In [1]: exec "'myPrefix_turquoise' = 42"
------------------------------------------------------------
   File "<string>", line 1
SyntaxError: can't assign to literal (<string>, line 1)


I think you meant:

exec "myPrefix_turquoise = 42"


/W

-- 
INVALID? DE!




More information about the Python-list mailing list