Le Fri, 20 Sep 2013 13:19:24 +0200, Jesus Cea <j...@jcea.es> a écrit : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > """ > sys.intern(b'12121212') > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: must be str, not bytes > """ > > I wonder why.
From http://docs.python.org/3.3/library/sys.html#sys.intern """sys.intern(string) Enter string in the table of “interned” strings and return the interned string [...]""" In Python 3 context, "string" means "str". Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com