Is it just Syntactic Sugar ?

Michael Hudson mwh21 at cam.ac.uk
Tue May 23 05:03:25 EDT 2000


Bjorn Pettersen <bjorn at roguewave.com> writes:

> ps: yes, Python will recompute the indices since the [] operator is only
> a call to __getitem__ which is free to do anything, including changing
> the array.

My recently posted patch only computed indices and the target of the
array ops once.  My patch is insufficient because it is inefficient,
and because it doesn't allow classes to override += and friends.  I
haven't redone it because (a) I'm not really sure which way one should
proceed and (b) my finals start two weeks yesterday.

Cheers,
M.

-- 
59. In English every word can be verbed. Would that it were so in
    our programming languages.
  -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html



More information about the Python-list mailing list