Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Named context arguments #95

dag opened this Issue · 0 comments

1 participant


Perhaps keyword arguments would be better than positional arguments. That is: have contexts yield dictionaries, and pass by key name rather than position. This might not be backwards-compatible without some switch.

def appcontext():
    yield dict(app=app, templates=templates)

def index(templates):
    assert len(templates) == 1

Currently the above would treat the dict as a single, positional argument. If we had yielded a two-tuple, the test would receive the app as 'templates'. The benefit of this idea is that we can easily "skip" arguments. Downsides would be the need to name argument and the possibility of name conflicts (however unlikely).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.