Modifying the {} and [] tokens
Scott David Daniels
Scott.Daniels at Acm.Org
Sat Aug 23 18:03:10 EDT 2003
Geoff Howland wrote:
> I want to modify the {} and [] tokens to contain additional
> functionality they do not currently contain, such as being able to add
> dicts to dicts, and other things that would be very helpful for me and
> my team mates to have.
You might want to contribute to pypy -- once their work is completed
we'll have a python written fully in python that will allow you such
experiments.
I'm sorry, but I cannot resist complaining a bit about allowing such
changes as implementable in modules:
user A likes (and implements) your idea about {} + {}, user B thinks
you are right, but where the two dictionaries share a coomon key, the
value shoud be the sum of the two values. Either of these works, but
modules expecting one will fail with the other. As a result, it seems
a bad idea to allow modules to make such changes. I do _not_ mean
that the experiment in redefining {} can/should not be tried, but
rather the experiment must be environment-wide; it does not isolate
nicely.
As a practical matter, I suspect the current feeling is towards fewer,
rather than more, punctualtion-based expressions -- they are harder to
look up i na reference document.
-Scott David Daniels
Scott.Daniels at Acm.Org
More information about the Python-list
mailing list