ways to declare empty set variable

Steve Holden steve at holdenweb.com
Thu Feb 14 00:27:18 CET 2008


cokofreedom at gmail.com wrote:
> The irony that, x = (,) produces an error.
> 
> Personally I would of thought it would be a better example of an empty
> tuple than anything else, but it still isn't that readable.
> 
> The use of dict/list/tuple/set seems to stand out a lot better, makes
> it readable! Else in a few years you'll have §x§ = !^!()
> 
> Or maybe I am going crazy...

Well, to me (,) makes about as much sense as {:}, which is to say none 
at all.

The call on the type with an empty argument list is certainly the most 
consistent usage, and will extend easily to new types.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list