Pythonification of the asterisk-based collection packing/unpacking syntax

Roy Smith roy at panix.com
Sat Dec 17 22:59:17 EST 2011


In article <4eed5eef$0$29979$c3e8da3$5496439d at news.astraweb.com>,
 Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:

> some academic languages may be 
> entire strong; but most real-world languages include elements of both. 
> Most commonly coercing ints to floats.

Early Fortran compilers did not automatically promote ints to floats.

> But not *entirely* different: numbers can be considered strings of 
> digits; and non-digit strings can have numeric values. I don't know of 
> any language that allows 1 + "one" to return 2, but such a thing wouldn't 
> be impossible.

It is possible for 1 + "one" to be equal to 2 in C or C++.  All it takes 
is for the string literal to be located at memory location 1.  Not 
likely, but nothing in the language prevents it.



More information about the Python-list mailing list