frozenset() without arguments should return a singleton
Stefan Behnel
stefan.behnel-n05pAM at web.de
Fri Feb 11 14:10:54 EST 2005
More information about the Python-list mailing list
Fri Feb 11 14:10:54 EST 2005
- Previous message (by thread): mxCGIPython binaries for Python 2.3.5
- Next message (by thread): frozenset() without arguments should return a singleton
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi! frozenset() doesn't behave as the other immutable empty data types in 2.4: .>>> '' is '' True .>>> () is () True .>>> frozenset() is frozenset() False .>>> id(()),id(()) (1077579820, 1077579820) .>>> id(()) 1077579820 .>>> id(frozenset()),id(frozenset()) (1077581296, 1077581296) .>>> id(frozenset()) 1077581440 .>>> id(frozenset(())) 1077582256 frozenset() called without arguments (or on empty sequences) should always return a singleton object. It is immutable, so I can see no reason why it should take up more resources than necessary. Stefan
- Previous message (by thread): mxCGIPython binaries for Python 2.3.5
- Next message (by thread): frozenset() without arguments should return a singleton
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list