write good examples by starting with real code https://jvns.ca/blog/2021/07/08/writing-great-examples/ …
-
-
Replying to @b0rk
Great post. I imagine you know this already, but I think that a lot of your readers might get tripped up by the fact that map(my_list) returns not a list but a map object (in Python 3). Or, at least, it still gets me from time to time. So, hooray for real examples, indeed.
1 reply 0 retweets 0 likes -
Replying to @NateMeyvis
what do you use map for? I noticed that but didn't mention it because I basically never use map, I always use list comprehensions
2 replies 0 retweets 0 likes
Pretty much only in code that I am the primary reader of (I think map is more readable than a list comprehension, at least sometimes, but I know that’s an idiosyncrasy). So, rarely, and I have no particular expertise in making wonderful use of it.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.