-
Notifications
You must be signed in to change notification settings - Fork 50
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
OMetaBase.apply should take kwargs, and _GrammarWrapper should pass them along #11
Comments
what would the syntax for rules that take keyword args look like? |
I don't know! Good question. Maybe this is not such a great idea, and also probably since I don't need it anymore I probably won't think too hard about it, so maybe it should go away. Keyword args are so much cooler than positional args though so maybe this would be a nice thing if it were possible. |
|
Or I guess |
if you can figure out how to make it work I would love to see a patch. |
I don't know if related, but I had a rule in which some parameters could be or could not, by using
So def rule_func(r=None, o=None, t=None, **kwargs):
return {} # real code goes here Is this the proper way to go? |
No. |
I know, but actually it does work. So, what is the right way to manage optional variables? |
well first, the I would rewrite the first expression as |
I see, thanks for the explanation. |
Maybe if I create some tickets it will persuade me to actually send you pull requests.
Right now _GrammarWrapper eats kwargs, so you can't actually get anything to the rules without icky positional args.
The text was updated successfully, but these errors were encountered: