does not only affect closures but any conditional:
if True:
def f():
pass
else:
def f():
pass
redefinition of function 'f' from line 2
** Summary changed:
- False positive with closures defined with if:
+ False positive redefinition with functions defined in conditionals
--
You received this bug notification because you are a member of Divmod-
dev, which is the registrant for Pyflakes.
https://bugs.launchpad.net/bugs/800691
Title:
False positive redefinition with functions defined in conditionals
Status in Pyflakes:
New
Bug description:
Such code:
def f(a):
if a:
def g(): pass
else:
def g(): do_something()
will issue a warning with a redefinition of g
To manage notifications about this bug go to:
https://bugs.launchpad.net/pyflakes/+bug/800691/+subscriptions
--
Mailing list: https://launchpad.net/~divmod-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~divmod-dev
More help : https://help.launchpad.net/ListHelp