-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
priority-1-normalThis issue has a normal priorityThis issue has a normal prioritysize-smallEasy work need to be doneEasy work need to be done
Description
Right now, syntax warning is generated with the following code.
@cached
def expensive_function():
...
However, the use of @cached
in this context can be useful in some contexts. Example: @cached
does effectively the same thing with significantly less code as the following construct using a global variable:
HAS_RUN=False
def expensive_function():
global HAS_RUN
if HAS_RUN:
return
else:
HAS_RUN=True
Can this syntax warning be configurable and/or removed?
lucemia
Metadata
Metadata
Assignees
Labels
priority-1-normalThis issue has a normal priorityThis issue has a normal prioritysize-smallEasy work need to be doneEasy work need to be done