Modifying the {} and [] tokens

Erik Max Francis max at alcyone.com
Sat Aug 23 15:27:02 EDT 2003


Geoff Howland wrote:

> On 23 Aug 2003 08:18:49 -0700, mis6 at pitt.edu (Michele Simionato)
> wrote:
> 
> >Subclass dict, define __add__ and __sub__ and it will work, but NOT
> >with the brace syntax. You must use something like
> >
> >mydict(a=1,b=2)+mydict(c=3,d=4)
> 
> Yeah, I got this to work off the bat.

So what's the problem?  If you got it to do what you wanted, why would
you possibly want your personal changes reflected officially in the
language?  Sit back for a moment and think what would happen if
_everybody_ proceeded this way.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ Wars may be fought with weapons, but they are won by men.
\__/  Gen. George S. Patton




More information about the Python-list mailing list