Modifying the {} and [] tokens

Geoff Howland ghowland at lupineNO.SPAMgames.com
Sat Aug 23 15:31:17 EDT 2003


On Sat, 23 Aug 2003 12:27:02 -0700, Erik Max Francis <max at alcyone.com>
wrote:

>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.

I didn't say my personal preferences should become the official
language.  I made arguments for some things I thought were logical
becoming part of the official language, and that seems fine.  We've
been over the problems with it, and why it is NOT part of the
language, but it still is a logical argument and was just rejected.

On my personal goals, that definitely wouldnt be added to the official
language, I was just looking for a way to make them work for my own
project.  If it was a hack, so be it.  If it turned out to not work
well, I could revert it.  It's not possible, so that's fine.

I'm satisfied with all the answers I've received in this thread and am
now fully illuminated on the subject.


-Geoff Howland
http://ludumdare.com/




More information about the Python-list mailing list