2 ms·
Not sure what this snippet does, but if it creates a block that is registered as a task named "name", then you can do the same with decorators: def task(f)
by viraptor 17y ago
Not sure what this snippet does, but if it creates a block that is registered as a task named "name", then you can do the same with decorators:
def task(f):
register_task(f.__name__, f)
return f
@task
def name(t)
.....
or similar.
- algorias 17y agoExactly. I fail to understand why people are so dismissive of languages/approaches that do things slightly differently and don't implement equivalent things in the exact same way. What's so special about the rake syntax?