(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/

https://en.wikipedia.org/wiki/Assignment_(computer_science)

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.
http://docs.sympy.org/latest/tutorial/solvers.html

The sage solver defines __eq__ (==) so expressions with variables produce symbolic equations and inequalities (relations).
http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/relation.html

PyDatalog defines __eq__ so that expressions with variables produce logic queries.
https://sites.google.com/site/pydatalog/Online-datalog-tutorial

The assignment Wikipedia article lists languages other than C and C++ which chose = and == for assignment and definable equality testing.

https://en.wikipedia.org/wiki/Equality_(mathematics)
https://en.wikipedia.org/wiki/Extensionality
https://en.wikipedia.org/wiki/Logical_equality






--

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