Documentation, assignment in expression.

rusi rustompmody at gmail.com
Sun Mar 25 12:17:52 EDT 2012


On Mar 25, 6:48 pm, Tim Chase <python.l... at tim.thechases.com> wrote:
>
> The old curmudgeon in me likes the Pascal method of using "=" for
> equality-testing, and ":=" for assignment which feels a little
> closer to mathematical use of "=".
>
> -tkc

Carroll Morgan author of programming from specifications
http://www.cs.ox.ac.uk/publications/books/PfS/ called colon in ':=' as
'make'. So := is 'make equal'  This generalizes nicely to other
specification operators (though not computable) eg :> is 'make greater
than'

So x :> x
can be refined to x := x+1
or to x := x*x if the precondition x > 1 is available



More information about the Python-list mailing list