This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: error in 2to3
Type: Stage: resolved
Components: 2to3 (2.x to 3.x conversion tool) Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder: Close 2to3 issues and list them here
View: 45544
Assigned To: Nosy List: Sandeep Srinivasa, brett.cannon
Priority: normal Keywords:

Created on 2017-01-03 14:04 by Sandeep Srinivasa, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg284562 - (view) Author: Sandeep Srinivasa (Sandeep Srinivasa) Date: 2017-01-03 14:04
docs_uploaded_at = dict(filter(lambda (x,y):True if len(y) == 3 else False,docs_uploaded_at.iteritems()))

produces

docs_uploaded_at = dict([x_y for x_y in iter(docs_uploaded_at.items()) if True if len(x_y[1]) == 3 else False])


without_transaction_users = filter(lambda x:False if x.phone in with_transaction_mobile else True,registered)

produces

without_transaction_users = [x for x in registered if False if x.phone in with_transaction_mobile else True]
msg284594 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-01-03 22:02
To help you work around this you can simplify your original code such that you don't trigger the issue:

dict((key, val) for key, val in docs_uploaded_at.iteritems() if len(val) == 3)

and

[x for x in registered if x.phone not in with_transaction_mobile]
History
Date User Action Args
2022-04-11 14:58:41adminsetgithub: 73327
2021-10-20 22:51:16iritkatrielsetstatus: open -> closed
resolution: wont fix
superseder: Close 2to3 issues and list them here
stage: resolved
2017-01-03 22:02:00brett.cannonsetnosy: + brett.cannon
messages: + msg284594
2017-01-03 14:04:28Sandeep Srinivasacreate