-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
add dict interface splitargdef and combineargdef #179
base: master
Are you sure you want to change the base?
add dict interface splitargdef and combineargdef #179
Conversation
Codecov Report
@@ Coverage Diff @@
## master #179 +/- ##
==========================================
+ Coverage 74.68% 75.82% +1.13%
==========================================
Files 9 9
Lines 403 426 +23
==========================================
+ Hits 301 323 +22
- Misses 102 103 +1
Continue to review full report at Codecov.
|
Hi Peter, thank you for the PR. I agree that the current situation is not ideal, but between the three options:
I'm going to favour option 3, at least until there's another, more compelling reason to make a MacroTools 0.6 release. Having two interfaces for the same thing is more maintenance burden, and confusing for new users of the package. Furthermore, When 0.6 will be on the horizon, I would consider merging this PR with a deprecation from |
Sure thing! I think this would be great to include with the next version, and I wanted to file the PR before I forgot the details. I chose |
I will clarify that there is no current work-around for literal |
There's a user-side work-around, of replacing
True. |
This PR adds new methods
splitargdef
andcombineargdef
(in addition to existingsplitarg
andcombinearg
) that use dictionaries as an interface. The dict interface more completely expresses corner cases, as described in #178. In particular, it provides robust solutions for literalnothing
argument defaults and avoids typeasserts when no type is given for an argument.