3 ms·
Well either the app object is global, in which case you've got global mutable state, or you're defining your handler functions later than module load time, whic
by gostevehoward 14y ago
Well either the app object is global, in which case you've got global mutable state, or you're defining your handler functions later than module load time, which is pretty uncommon practice.
- wahnfrieden 14y agoYou can use the return value of some function as a decorator, as a way to avoid global state and tie the decorator to a given instance of your routing object. (I don't know flask, but this isn't a limitation of python)