why cannot assign to function call

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Fri Jan 2 21:05:51 CET 2009


Derek Martin a écrit :
> On Fri, Jan 02, 2009 at 11:43:30AM -0500, Steve Holden wrote:
>> Derek Martin wrote:
>>> What the Python community often overlooks, when this discussion again
>>> rears its ugly head (as it seems to every other hour or so), is that
>>> its assignment model is BIZARRE, as in it's conceptually different
>>> from virtually all other languages substantially taught in
>>> undergraduate computer science programs.  And for that matter, it's
>>> pretty unintuitive generally.
>>>
>> I'd definitely argue against bizarre. It's actually very easy to
>> understand, and Python is by no means the only language to have used it.
> 
> Clearly the first and third are true. :)  But CS programs still
> generally teach primarily C/C++, Java, and (some form of) assembly
> AFAICT.  A few odd ones pop up here and there along the way (I studied
> with scheme, for example), but they vary and are highly
> program-dependent.  What the average CS grad sees is, AFAICT, still
> very much what I described.  Those languages also behave similarly to
> what students see in mathematics (e.g. algebra etc.).  With only that
> to go on, Python seems rather weird, and I think from the frequency
> with which these discussions occur on this list, clearly it *IS*
> difficult for a neophyte Python programmer to understand the
> assignment model.

Took me about half an hour to grasp, not even being "CS grad" (nor 
whathever "grad" FWIW). By that time, I had a couple monthes working 
experience with VB, and had learned (but never seriously used) bits of 
C, C++, Java and Pascal.




More information about the Python-list mailing list