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

Carl Banks imbosol at aerojockey.com
Thu Jul 24 19:00:45 EDT 2003


Alan Gauld wrote:
> 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! :-)


+1 if Python's parser could handle it (which seems dubious).


-- 
CARL BANKS




More information about the Python-list mailing list