A question on modification of a list via a function invocation

Mok-Kong Shen mok-kong.shen at t-online.de
Wed Aug 16 21:43:55 EDT 2017


Am 17.08.2017 um 02:14 schrieb Ned Batchelder:
> On Thu, Aug 17, 2017 at 8:29 AM, Mok-Kong Shen wrote:
>>   Anyway, while
>> any new user of a programming language certainly can be expected to
>> take good efforts to learn a lot of new stuffs, I suppose it's good
>> for any practical programming language to minimize the cases of
>> surprises for those that come from other programming languages.
> Which other languages? Should Python's functions act like C functions,
> or like Haskell functions?  Should Python's strings act like C strings,
> or Ruby strings? Should Python's syntax be like C syntax, or like Lisp
> syntax? If languages can't be different from each other, then there's no
> point in having different languages.  I agree that gratuitous
> differences are, well, gratuitous, but the name/value data model of
> Python is not some trivial detail that we could change to match some
> other language: it's a fundamental part of what makes Python what it is.
> 
> For some reason, students have been taught that things can be either
> call-by-reference or call-by-value. But those are not the only two
> possibilities, and neither completely describes how Python works.
> 
> Learn Python for what it is.

Your last sentence is fine and certainly to be accepted. Is there a
good document with which one could well use to resolve problems like the
present one? (Earlier I learned a few programming languages from
their ISO standard documents, which was not easy but later turned out
to be quite profitable.)

M. K. Shen

expect that there be a good documen







More information about the Python-list mailing list