Pass variable by reference

Steven D'Aprano steve at pearwood.info
Wed May 7 00:59:47 EDT 2014


On Tue, 06 May 2014 19:54:28 -0700, Rustom Mody wrote:

> The number of possible concepts is infinite
> 
> The number of words is finite (even assuming unicode!!)

Not true. If you allow longer and longer words, with no upper limit, the 
number of words is also infinite.

If you allow compound words (joined by spaces or hyphens), with no limit 
on the number of parts, the number of words is also infinite.

> IOW A combinatorial problem...

Not really. The problem is actually a compression problem, not a 
combinatorial problem. We have no difficulty in coming up with a 
(possibly very long) word for the concepts:

    C uses "32-bit-twos-complement-signed-integers"; 
    Python uses "twos-complement-signed-big-integer-objects"

but since programmers are lazy, we like short names for things, and the 
more frequently we use something, the shorter we like it. Hence we apply 
lossy compression to the concepts to get short names:

    C uses ints;
    Python uses ints

and the distinction between the two is lost.


-- 
Steven



More information about the Python-list mailing list