Steve Holden <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > [...] > > > > Note that '()' is syntactically null. Parentheses don't declare a > > tuple literal, commas do. Parentheses are for grouping within > > expressions, not specifying type. > > > Tell that to the interpreter: > > >>> type(()) > <type 'tuple'> > >>> tuple() is () > True > >>>
Well, knock me down with a kipper. That makes it even more a violation of principle-of-least-astonishment that the '(foo)' form doesn't give a one-element tuple literal. -- \ "If consumers even know there's a DRM, what it is, and how it | `\ works, we've already failed." —Peter Lee, Disney corporation, | _o__) 2005 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list