Can global variable be passed into Python function?

Chris Angelico rosuav at gmail.com
Sat Feb 22 01:36:52 EST 2014


On Sat, Feb 22, 2014 at 6:20 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> On the question of how variables can be passed to functions, C, of
> course, has the & operator and Pascal has the "var" keyword.

That doesn't pass a variable into a function, though. It passes the
address of that variable, and C lets you stuff something into an
address. That's not the same thing.

ChrisA



More information about the Python-list mailing list