Opened 5 years ago

Last modified 4 years ago

#6542 enhancement new

Use of map where the result is unused.

Reported by: Alex Gaynor Owned by: Alex Gaynor
Priority: normal Milestone:
Component: core Keywords:
Cc: Alex Gaynor Branch:
Author:

Description

This is bad style (there's no need to build a whole list which is never used), and won't work on py3k where map returns a generator.

Attachments (2)

t6542.diff (487 bytes) - added by Alex Gaynor 5 years ago.
t6542.2.diff (3.1 KB) - added by Alex Gaynor 5 years ago.
On a lark I grepped around and found a few more instances of this pattern.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by Alex Gaynor

Attachment: t6542.diff added

Changed 5 years ago by Alex Gaynor

Attachment: t6542.2.diff added

On a lark I grepped around and found a few more instances of this pattern.

comment:1 Changed 5 years ago by Jean-Paul Calderone

Thanks for this patch Alex. Please be sure to read ReviewProcess as you continue to contribute to Twisted.

comment:2 Changed 5 years ago by Alex Gaynor

Keywords: review added

comment:3 Changed 5 years ago by Alex Gaynor

Cc: Alex Gaynor added

comment:4 Changed 4 years ago by Tom Prince

Keywords: review removed
Owner: set to Alex Gaynor

Thanks for your contribution.

It appears that the changes to twisted/conch/insults/window.py and twisted/mail/relaymanager.py don't have any test coverage.

Other than that, this looks good.

Note: See TracTickets for help on using tickets.