mutable default parameter problem [Prothon]
mark at prothon.org
Tue Jun 29 08:49:56 CEST 2004
Paul Rubin wrote:
> "Mark Hahn" <mark at prothon.org> writes:
>> Yes, a Prothon identifier is the same as a Python identifier except
>> that it can end with an exclamation mark ( ! )or a question mark ( ?
>> ). These marks can only appear at the end and there can only be
>> one. It is up to the programmer to make sure he/she uses them
> How do you parse
As a! = b. Symbols are extracted by the lexer from left to right. Luckily
accidently typing "a != b" as "a!=b" would cause a parser error since
assignments aren't legal in expressions.
Now that I see this example, maybe it would be a good idea to not allow it
because of it's ambiguity. I'll put that up for a vote on our list.
More information about the Python-list