Simple list.append() question
mwh21 at cam.ac.uk
Fri Apr 28 15:21:02 CEST 2000
Christian Tismer <tismer at tismer.com> writes:
> > Greg Ewing <greg at cosc.canterbury.ac.nz> writes:
> > > Maybe the LC syntax should include something like
> > >
> > > [ times 10]
> > But wouldn't that make "times" a keyword? Not sure I'd want that...
> Currently, yes, but it is absolutely not necessary to be so.
> It requires to change the grammar to treat operators
But then what happens to things like
times = 10
return [ times times]
? I'm not sure context senstive keywords are a good idea (in any
language, ever). Currently a naked identifier in Python is either a
variable reference or a keyword, and you can tell which just by
looking at *it*, not at its surroundings - and I think I like that.
Though it would be occasionally useful to be able to call a variable
nonono, while we're making wild conjectures about the behavior
of completely irrelevant tasks, we must not also make serious
mistakes, or the data might suddenly become statistically valid.
-- Erik Naggum, comp.lang.lisp
More information about the Python-list