Late-binding of function defaults (was Re: What is a function parameter =[] for?)

BartC bc at freeuk.com
Wed Nov 25 08:37:59 EST 2015


On 25/11/2015 13:06, Marko Rauhamaa wrote:
> BartC <bc at freeuk.com>:

>> Then, from the point of view of a beginner, you have two distinct ways
>> of representing a list of objects: a tuple and a list. Exactly why
>> there have to be two is never really made clear beyond the inadequate
>> explanation that one is immutable and the other mutable.

> However, tuples are a way to represent records, groupings of related
> values, where the semantics of each value is determined by its position
> in the tuple. The members in a tuple are typically of different data
> types.

Using tuples in the same way that other languages implement records is 
going to be difficult if you can't change the values of the fields!

> My "simpler" is different from your "simpler". Even C# has a lot of
> advanced concepts, as maybe even Fortran does nowadays.
>
> My own recommendation would be Scheme, but it is even more "elitist"
> than Python.

OK, Lisp. (I can't actually tell the difference.)

-- 
Bartc



More information about the Python-list mailing list