Python3: to add, remove and change
Raymond Hettinger
python at rcn.com
Thu Apr 2 15:11:44 EDT 2009
On Apr 2, 12:39 am, bearophileH... at lycos.com wrote:
> To add again: tuple unpacking in function arguments: it's handy, hi-
> level, de-clutters the code and shortens it too.
+1 But you will have to talk to Brett about it. He's the one
who led the effort to kill it.
> To change: I'd like {:} as empty dict literal, and {} as empty set
> literal.
Unless you can time machine back to 1990, I would say that the {}
notation for emtpy dicts is too firmly entrenched. I don't think
it is possible to switch without causing a great deal of unnecessary
pain. Besides, it doesn't hurt much to write: s=set() or d=dict()
which are explicit, clear, and short. That's what I usually do in
my code.
> To do nothing: probably I will never fully like the syntax of tuple
> literals. It's not clean. But in practice I can live with it, and I
> have so far failed to invent a better syntax. The main problem is that
> ASCII (and keyboards too, maybe) was created for business purposes and
> it has too few delimiters.
« unicode has lots of delimiters »
Raymond
More information about the Python-list
mailing list