-
Notifications
You must be signed in to change notification settings - Fork 82
Add KeywordArgs and Optional contracts #151
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 KeywordArgs and Optional contracts #151
Conversation
1807f83
to
7616b40
Compare
I'd call the contract |
@nixpulvis thought about that too, but the chance that the user will have the |
Yea, I actually hit this with existing contracts pretty often anyway. I think the real solution is namespacing these contracts under something like |
So how about
|
``` | ||
|
||
``` | ||
ContractError: Contract violation for argument 2 of 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just before this ContractError, can you add a line that calls the connect
function that will throw the related ContractError, and make it obvious that we are not passing in a value for port
?
Left comments, looks good otherwise. 👍 for updating the tutorial. |
@egonSchiele Addressed. Plus renamed both contracts to |
Add KeywordArgs and Optional contracts
Thanks! |
Nice! |
Excellent! If we're discussing names, my choice is NamedArgs and Opt. I think brevity is a good aim: contract specs can get quite long. |
Hey @gsinclair, we already merged this as |
Fixes #131
Allows to do this:
Contract names are subject to discussion.