Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python referenced before assignment in function

# When Python parses the body of a function definition and encounters an assignment such as

 feed = 5 
#Python interprets feed as a local variable by default. If you do not wish for it to be a local variable, you must put

global feed
feed = 5
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #referenced #assignment #function
ADD COMMENT
Topic
Name
7+8 =