Can global variable be passed into Python function?

Marko Rauhamaa marko at pacujo.net
Sat Mar 1 18:23:57 CET 2014


Ben Finney <ben+python at benfinney.id.au>:

> No. I'm telling you that ‘is’ is *wrong* for comparing strings,
> because it is unreliable.

No, it isn't as long as the string object references have a common
assignment "pedigree." Assignment (including parameter passing) is
guaranteed to preserve identity of any object.


Marko



More information about the Python-list mailing list