[New-bugs-announce] [issue24592] global var defined in module not returned by function
arthur
report at bugs.python.org
Wed Jul 8 18:03:01 CEST 2015
New submission from arthur:
defined global var, glob.myVar, in separated module
imported module containing glob.myVar
in function1, func1():
glob.myVar = ""
func1Var = func2()
in function2, func2():
if (...):
glob.myVar+= "abc"
func2() # call func2() again - recursive
else:
return glob.myVar
I always find:
func1Var is None = True
An obvious workaround is
func1Var = glob.myVar
which is fine
----------
components: Windows
messages: 246460
nosy: arthur, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: global var defined in module not returned by function
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24592>
_______________________________________
More information about the New-bugs-announce
mailing list