[Matrix-SIG] Re: Bug in generating .pyc files!!!

skaller skaller@maxtal.com.au
Wed, 03 Nov 1999 00:24:46 +1100


Guido van Rossum wrote:
> 
> The result of the 'is' operator on immutable objects (like strings)
> not well-defined.  The Python VM is allowed but not required to cache
> objects with certain values and reuse them as the outcome of certain
> expressions (such as l[0] above) is it sees fit to optimize speed.
> 
> The solution is not to use 'is' here but always to use '==' when
> comparing strings.
> 
> This is definitely not a bug and definitely does not need to be fixed.

FYI: Viper uses value comparisons on immutable objects; that is,
'is' and '==' are the same.
 

-- 
John Skaller, mailto:skaller@maxtal.com.au
1/10 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
downloads: http://www.triode.net.au/~skaller