(original) (raw)
On Sunday, April 29, 2018, Eitan Adler <lists@eitanadler.com> wrote:
On 29 April 2018 at 01:34, Jeff Allen <ja.py@farowl.co.uk> wrote:
> On 27/04/2018 08:38, Greg Ewing wrote:
> I speculate this all goes back to some pre-iteration version of FORmula
> TRANslation, where to its inventors '=' was definition and these really were
> "statements" in the normal sense of stating a truth.
https://www.hillelwayne.com/post/equals-as-assignment/
C and C++ are '=' and '=='.
The Sympy solver, for example, solves Eq(lhs, rhs) equations and expressions that are assumed to be equal to zero.
The sage solver defines __eq__ (==) so expressions with variables produce symbolic equations and inequalities (relations).
PyDatalog defines __eq__ so that expressions with variables produce logic queries.
The assignment Wikipedia article lists languages other than C and C++ which chose = and == for assignment and definable equality testing.
--
Eitan Adler
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/ wes.turner%40gmail.com