very Very VERY dumb Question About The new Set( ) 's

Alan Gauld alan.gauld at btinternet.com
Thu Jul 24 18:31:11 EDT 2003


On 23 Jul 2003 18:47:32 GMT, rastm2 at aol.commorespam (Raymond
Arthur St. Marie II of III ) wrote:

> Doc\ref 2.6 Delimiters show's three unused characters "@ $ ?".
> @ sort of looks like and sort of sounds like a set an 
> $  well sort of obvious. 
> I can imagine that the $ would be confused for money and @ is ugly.

Since I detest any thought of prefix symbols to indicate type(as
per Perl etc) but have no visibility of these debates, I'll throw
in my suggestion and done a flameproof suit!

Since both dictionaries and Sets require unique members/keys, 
why not use the dictionary braces but without the key/value
syntax. So:

mySet = {1,2,3,4}

Which is illegal for a dictionary but would be OK for a Set.
It also just happens to be the same delimiters used in math 
for sets...

Just a thought before I go to bed! :-)

Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld




More information about the Python-list mailing list