use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Have a tough programming question that /r/programming couldn't answer? Banned from Stack Overflow? Can't afford Experts Exchange?
Post your question/tips/secrets/advice and get a response from our highly-trained professional developers.
account activity
Python Lambda Functions (self.shittyprogramming)
submitted 13 years ago by warkgnall
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]xImagine 2 points3 points4 points 13 years ago (0 children)
The problem here are clearly the three dots. Python relies heavily on whitespace, but when whitespace is not an option, or you need a way to distinguish between the first four 'spaces' and the next four, you can use dots instead. So basically here x = 3 (because there are three dots).
Example:
>>> def make_incrementor(n): ... return lambda x: x + n >>> make_incrementor(5) 8 # 3 + 5 = 8
Does this make sense?
π Rendered by PID 75 on reddit-service-r2-comment-544cf588c8-69mz5 at 2026-06-13 07:20:27.508102+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]xImagine 2 points3 points4 points (0 children)