Sign in to follow this  
Daniel Miller

python: scope poop

Recommended Posts

Daniel Miller    218
Is it possible to set the value of a global object from inside a method without passing the object to the method?
i = 0
def f:
    i = 1
I want the 'i' in 'f' to be the global 'i'.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this