Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
gaius
on March 8, 2009
|
parent
|
context
|
favorite
| on:
Ruby-style Blocks in Python
I don't understand why naming a function is such a problem? You can even do it in the local scope and prefix it _ if you want to.
sah
on March 8, 2009
[–]
Would you find it problematic to write if and for statements like this?
def _forbody(x): def _ifbody(x): print x if x % 2: _ifbody(x) for x in xrange(10): _forbody(x)
gaius
on March 9, 2009
|
parent
[–]
But those are one-liners like you can already do in Python.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: