On Sat, 12 Feb 2005 23:21:58 +0100, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > > Raymond Hettinger wrote: > >Stefan Behnel wrote: > >>I stumbled over the fact that 'frozenset()' doesn't return a constant but > >>creates a new object everytime. Since it is immutable, I wrote to c.l.py > >>that this behaviour is different from what tuple() & Co do. > > > > It is not quite correct to say that this is what all immutables do: > > > > > >.>>>x = 500 > >.>>>y = 600 - 100 > >.>>>x is y > > False > > I know. The same is true for concateneted strings, etc. But whenever an > immutable object is created directly ('by hand'), it holds. It also holds, > btw, for tuple() - as opposed to (). >
$ python Python 2.3.5c1 (#2, Feb 4 2005, 10:10:56) [GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> long() is long() False >>> Jp -- http://mail.python.org/mailman/listinfo/python-list