Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Alex Tichtchenko <flash@ax...>  20021211 22:15:52

Well, for what it's worth here is the definition of 'is' from python ref: "The operators is and is not test for object identity: x is y is true if and only if x and y are the same object. x is not y yields the inverse truth value." Note the term 'object' in the definition. How can you say that a literal is the same object as a variable that holds equivalent value ? Cheers, Alex  Original Message  From: "Samuele Pedroni" <pedronis@...> To: "Updike, Clark" <Clark.Updike@...>; <jythonusers@...> Sent: Wednesday, December 11, 2002 10:27 PM Subject: Re: [Jythonusers] jython bug?: >>> [].count(None) is 0 > From: "Updike, Clark" <Clark.Updike@...> > > I didn't find anything on this in the bug database so here goes: > > > > Jython 2.1 on java1.3.1_01 (JIT: null) > > Type "copyright", "credits" or "license" for more information. > > >>> [].count(None) is 0 > > 0 > > >>> [].count(None) == 0 > > 1 > > >>> > > > > And just to make sure I wasn't > > misunderstanding something about python: > > > > Python 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on win32 > > Type "copyright", "credits" or "license" for more information. > > >>> [].count(None) is 0 > > 1 > > >>> [].count(None) == 0 > > 1 > > >>> > > > > > > These seems suprisingly fundamental that it hasn't come up already. > > Is it a bug? > > > > there are no guarantees about number identities: > > Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> a=99 > >>> a is 99 > 1 > >>> a=100 > >>> a is 100 > 0 > >>> > > regards. > > >  > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Jythonusers mailing list > Jythonusers@... > https://lists.sourceforge.net/lists/listinfo/jythonusers 