The editor adds ":" when type in multiply lines list comprehension
See original GitHub issueFrom ruoyu0…@gmail.com on 2013-04-14T21:39:40Z
Spyder Version: 2.2.0rc Python Version: 2.7.3 Qt Version: 4.8.3, PyQt4 (API v2) 4.9.5 on Windows
What steps will reproduce the problem?
Type in multiply lines list comprehension such as:
[some_very_long_expression(x)
for x in range(n)
if n % 2 == 0]
What is the expected output? What do you see instead?
“:” will be appended to the “for” & “if” lines.
_Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1354_
Issue Analytics
- State:
- Created 9 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Line continuation for list comprehensions or generator ...
However, when the list comprehension needs to be split over multiple lines, that conciseness can make the expression extremely difficult to read.
Read more >Python List Comprehension: single, multiple, nested, & more
A list comprehension works by translating values from one list into another by placing a for statement inside a pair of brackets, formally...
Read more >Overusing list comprehensions and generator expressions in ...
In general, I prefer to write most of my comprehensions spaced out over multiple lines of code using the indentation style above.
Read more >Understanding List Comprehensions in Python 3 - DigitalOcean
Our list comprehension takes the nested for loops and flattens them into one line of code while still creating the exact same list...
Read more >List Comprehensions in Python - Stack Abuse
List Comprehensions is the process of creating a new list from an existing one. They offer many benefits to traditional lists.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @dalthviz. Sure, I just need to figure out the details first so I can actually implement something. I might not have time to do so today, though. Maybe tomorrow or next weekend.
Awesome and no problem 👍 Thanks again for the help 😃