Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto eval code strings #23

Open
lkraider opened this issue Jan 26, 2016 · 1 comment
Open

Auto eval code strings #23

lkraider opened this issue Jan 26, 2016 · 1 comment

Comments

@lkraider
Copy link

In my production server I keep needing to do:

def crud_handler():
    request = __import__('user_posted_json')
    eval(request.method)(db_connection, request.args)

Please consider allowing this syntax so my code looks cleaner:

def crud_handler():
    request = __import__('user_posted_json')
    request.method(db_connection, request.args)

I think adding a __call__ method on DottedDict that wraps eval should do it.

@lkraider
Copy link
Author

Ok, so I waited 20+ hours for a fix here and finally gave up on waiting and did it myself. Please merge #25 so I can close this long standing issue at last.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant