python - Is it more pythonic to close a function with return or through indentation? -
if have function not need return variable, considered better coding practice close function this:
def foo(): """code""" return # more code or this?
def bar(): """code""" # more code
i'd use bare return exit function. @ end of function leaves me wondering if meant return , forgot finish.
Comments
Post a Comment