Modifying the {} and [] tokens

OKB (not okblacke) BrenBarn at aol.com
Sat Aug 23 03:02:53 EDT 2003


Geoff Howland wrote:

> IMO, there are some things
> missing from the language, and while maybe they wont be added, I 
would
> like to have them.
> 
> {} + {}, {} - {}.  [] - [], etc

    	I'm a little puzzled as to why you'd need these, since it seems 
like all they allow you to is hard-code a certain combination of 
statically defined objects.  That is, if you're going to do

{ 'a': 1, 'b': 2 } + { 'c': 3, 'd': 4}

    . . .why not just write

{ 'a': 1, 'b': 2, 'c': 3, 'd': 4}

    	in the first place?

-- 
--OKB (not okblacke)
"Do not follow where the path may lead.  Go, instead, where there is
no path, and leave a trail."
	--author unknown




More information about the Python-list mailing list