The “does Python have variables?” debate

Dan Sommers dan at tombstonezero.net
Wed May 7 23:43:49 EDT 2014


On Thu, 08 May 2014 01:27:08 +0000, Steven D'Aprano wrote:

> If I have understood correctly, and I welcome confirmation or
> correction, one can have any combination of:

> * dynamic typing and name binding (e.g. Python and Ruby);
> * static typing and name binding (e.g. Java);
> * dynamic typing and fixed-location variables (any examples?);
> * static typing and fixed-location variables (C, Pascal).

C unions, if you squint just right, are fixed location variables and at
least partially dynamic, within the bounds of what you define at compile
time.

And at the risk of opening another can of worms, C's typing is
sufficiently weak that it can be way more dynamic than many programmers
want.  It's this |↔| close to assembly language (ChrisA's example of the
combination of dynamic typing and fixed locations).

Dan



More information about the Python-list mailing list