Curious assignment behaviour

David C. Ullrich ullrich at math.okstate.edu
Tue Oct 16 14:05:58 EDT 2001


On Wed, 10 Oct 2001 14:54:29 -0700, "John Roth"
<johnroth at ameritech.net> wrote:

[...]
>
>In mathematics, "=" is an assertion that two expressions have the same
>value over the applicable portion of the domain. Pure mathematics
>doesn't have an equivalent of assignment.

Not that it matters, but: Huh?

In fact lots of people do use := to distinguish assignment
from comparison all the time in mathematics. Not everyone.
But everyone says things like "Let x = 42", which certainly
looks to me like an assignment. (One might argue that it's
equivalent to saying "Consider now the case x = 42", so it's
actually a comparison, not an assignment. If one argued that
one would have to explain why "Let 42 = x" doesn't fly.)





More information about the Python-list mailing list