[Python-3000] set literals

Diogo Kollross diogoko at gmail.com
Sat Jul 8 16:28:47 CEST 2006


> str and unicode are *distinct* types. they may be related, but not in
> the sense that type("hello") and type(r"hello") both return str.

They're distinct types, but not that distinct:

Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> len(set(dir(set)).symmetric_difference(set(dir(dict))))
38
>>> len(set(dir(frozenset)).symmetric_difference(set(dir(dict))))
31
>>> len(set(dir(str)).symmetric_difference(set(dir(unicode))))
9

--
diogoko


More information about the Python-3000 mailing list