Error Message: Can't assign to Operator

Michael P. Reilly arcege at shore.net
Tue Aug 17 18:33:07 EDT 1999


Jonathon <jblake at stamp-coin.com> wrote:

: I keep hitting this error message:
: SyntaxError:  can't assign to operator(line 3056)
: 
: Line 3056 is
: meta-previous = string.join( the_ultimate_file_destination_is_this, string_record_id, suffix )
: 
: the_ultimate_file_destination_is_this, string_record_id and  suffix 
: are all defined elsewhere.

: Questions:

: Why does that construct not work?
: How can I fix this construction?

It is probably because "meta-previous" is parsed as "meta" "-" "previous"
a subtraction expression.  Change the minus ("-") to an underscore ("_")
and it should work better.  I've done this. :)

  -Arcege





More information about the Python-list mailing list