← Back to team overview

divmod-dev team mailing list archive

[Bug 879941] Re: Unused variables aren't detected with destructuring assignment

 

This is somewhat intentional.  'ignored, ignore, ignored, useful,
ignored, ignored =
some_dumb_tuple_that_should_have_been_an_object_with_attributes' is an
unfortunately common idiom, given the way some Python APIs are designed.

-- 
You received this bug notification because you are a member of Divmod-
dev, which is the registrant for Pyflakes.
https://bugs.launchpad.net/bugs/879941

Title:
  Unused variables aren't detected with destructuring assignment

Status in Pyflakes:
  New

Bug description:
  In the code:

  def foo():
      x, y = 1, 2
      return 3

  x and y are not shown as being unused.

To manage notifications about this bug go to:
https://bugs.launchpad.net/pyflakes/+bug/879941/+subscriptions


References