anything like C++ references?

Martin v. Löwis martin at v.loewis.de
Mon Jul 14 07:56:40 CEST 2003


Stephen Horne <intentionally at blank.co.uk> writes:

> Funny thing. When I use algebra, the variables I define don't end up
> referring to different values, functions or whatever unless I
> explicitly redefine them. When I write a definition on one piece of
> paper, the things I wrote earlier on another sheet don't change.

That, typically, is because you don't have any mutating operations in
your formulae. All functions you use are side-effect-free. If you
translated the sheets of paper literally into Python, the formulae
would work the way you expect them to work.

Regards,
Martin




More information about the Python-list mailing list