[Python-3000] Use of bracketing characters: (), {}, []

Edward C. Jones edcjones at comcast.net
Wed May 3 21:33:21 CEST 2006


There is a current thread on notations for sets and dicts. A more 
general question is: How should the precious pairs of bracketing 
characters,(), {}, and [] be used? Currently, parentheses are used for 
grouping, function calls and tuples. Curly brackets are used for 
dictionaries and, perhaps in the future, for sets. Square brackets are 
used for subscripts and dictionaries.

Are these bracketing pairs used in too many ways? Does the language need 
more bracketing pairs, perhaps "<<<", ">>>"? Any way to get rid of the 
horrible ancient wart of "(a,)" for a tuple of length one?


More information about the Python-3000 mailing list