Re:Flask 1.0 Released
by BerislavLopac on Friday April 27, 2018 @02:46AM
(#16938865)
OK, fair point, I used a wrong term here. So instead of global variables we have dynamic modules that represent a stateful context object which is different depending on where they are imported and when. Very un-Pythonic, and honestly I'd prefer global variables here. :-/
[ Parent
| on HN ]
>different depending on where they are imported and when
Er, no. Their value depends on where in the callstack you read it, not on where/how they're imported. They're like global variables but with thread locality, and with a stack of values.