Can global variable be passed into Python function?
Marko Rauhamaa
marko at pacujo.net
Sat Mar 1 06:28:09 EST 2014
Ben Finney <ben+python at benfinney.id.au>:
> Use ‘==’, since that's all that matters for getting a value that will
> work fine.
You are telling me to use '==' if I choose string objects and 'is' if I
choose some other objects.
I prefer a solution that works regardless of what objects I choose for
identifiers.
There really is no taboo against string object identity if you know what
you are doing.
Marko
More information about the Python-list
mailing list