PATCH: Augmented assignment

Paul Magwene paul.magwene at yale.edu
Sat Jun 10 21:23:53 EDT 2000


Thomas Wouters wrote:
> 
> On Sat, Jun 10, 2000 at 03:22:19PM -0400, Paul Magwene wrote:
> > Christian Tanzer wrote:
> 
> > > It doesn't obfuscate code looking like:
> 
> > >    nested_structure [some_index] [another_index] = nested_structure [some_index] [another_index] + 1
> 
> > Please tell me you're not REALLY writing code that looks like that, when
> > something like:
> >
> >       nested[i][j] = nested[i][j] + 1
> 
> > will do just as well (and is a lot easier to read).
> 
> *Please* tell me you aren't really using variable names like 'i' and 'j' in
> large programs ? Sure, they're fine for loop counters, but you dont always
> index large structures with those.
> 

If I have a bunch of way-too-long-variables-names that I need to use to
index structures I'll setup aliases --- see Moshe Zadka's post...

--Paul

-- 

Paul Magwene
paul.magwene at yale.edu




More information about the Python-list mailing list