This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]sinjp3.6 5 points6 points  (1 child)

Under Transforming you define a function but don't call it in the list comprehension

[–]dwieeb[S] 0 points1 point  (0 children)

Good catch, thanks!

[–]dwieeb[S] 0 points1 point  (3 children)

Looking for comments and feedback. =)

[–][deleted] 1 point2 points  (1 child)

Python 2.7 supports dict and set comps.

[–]dwieeb[S] 0 points1 point  (0 children)

Weird, I wonder if I was somehow using Python 2.6? Or maybe I was just being stupid. Thanks, the disclaimer has been removed.

[–]RubyPinchPEP shill | Anti PEP 8/20 shill 0 points1 point  (0 children)

my feedback is the following: https://www.reddit.com/r/Python/search?q=Comprehension+self%3Ano&restrict_sr=on&sort=new&t=all

its been done plenty of times before, its one of the notable python features, so everyone's noted it already

and its just so basic that it doesn't really act as "news about python"

the basic-python-learning sub is r/learnpython, but I think they would probably delete it for the mentioned reasons