Can global variable be passed into Python function?

Chris Angelico rosuav at gmail.com
Sat Mar 1 06:59:52 EST 2014


On Sat, Mar 1, 2014 at 10:28 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
> 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.

And, as proven here in this thread, you do not know what you are doing.

ChrisA



More information about the Python-list mailing list