Merge "Fix parenthesis typo misunderstanding in periodic_task"

This commit is contained in:
Jenkins
2014-06-14 18:39:07 +00:00
committed by Gerrit Code Review

View File

@@ -80,14 +80,14 @@ def periodic_task(*args, **kwargs):
return f return f
# NOTE(sirp): The `if` is necessary to allow the decorator to be used with # NOTE(sirp): The `if` is necessary to allow the decorator to be used with
# and without parents. # and without parenthesis.
# #
# In the 'with-parents' case (with kwargs present), this function needs to # In the 'with-parenthesis' case (with kwargs present), this function needs
# return a decorator function since the interpreter will invoke it like: # to return a decorator function since the interpreter will invoke it like:
# #
# periodic_task(*args, **kwargs)(f) # periodic_task(*args, **kwargs)(f)
# #
# In the 'without-parents' case, the original function will be passed # In the 'without-parenthesis' case, the original function will be passed
# in as the first argument, like: # in as the first argument, like:
# #
# periodic_task(f) # periodic_task(f)