Closed smarie closed 5 years ago
From a stack overflow example at https://stackoverflow.com/questions/52126071/decorator-with-arguments-avoid-parenthesis-when-no-arguments
def foo(logger=logging.getLogger('default')): pass @wraps(foo) def bar(*args, **kwargs): pass bar()
raises SyntaxError: invalid syntax def foo(logger=<logging.Logger object at 0x000001D5844AF518>)
SyntaxError: invalid syntax def foo(logger=<logging.Logger object at 0x000001D5844AF518>)
From a stack overflow example at https://stackoverflow.com/questions/52126071/decorator-with-arguments-avoid-parenthesis-when-no-arguments
raises
SyntaxError: invalid syntax def foo(logger=<logging.Logger object at 0x000001D5844AF518>)