Simple list.append() question
Christian Tismer
tismer at tismer.com
Fri Apr 28 10:19:46 EDT 2000
Michael Hudson wrote:
>
> 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
> > differently.
>
> But then what happens to things like
>
> times = 10
> return [[] times times]
No problem for me. I wouldn't write this, for clarity.
No reason to forbid it, anyway.
> ? 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
> `class'.
Well, we would get into trouble anyway, if keywords appear
in other contexts but as attributes. self.class would be ok,
but class as a parameter, and you can't access it.
Algol68's-bold-stropping-had-its-benefits - ciao - chris
--
Christian Tismer :^) <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH : Have a break! Take a ride on Python's
Kaunstr. 26 : *Starship* http://starship.python.net
14163 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
where do you want to jump today? http://www.stackless.com
More information about the Python-list
mailing list