-
Notifications
You must be signed in to change notification settings - Fork 34
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
Resource.get overlaps dict.get method #8
Comments
Another (possibly ugly) workaround is to use the unbound method: dict.get(company, 'some_data') This avoids copying the data at least... I definitely agree that this isn't ideal (though, I speak as a third-party, not for clearbit). I think that a possible solution would be to change the method names:
But that would definitely be a breaking change. I don't know how often those methods are actually called from client code though, so it might not be too bad (I think that usually |
Makes sense. I'll figure out a fix for this. |
I would echo this, because I just stumbled upon this gotcha.. |
any updates on this? |
Check out my branch: |
Since it's not guaranteed that some data presents it seems reasonable to check replies with dict.get method company.get('some_data', 'default').
However it's not possible, because get method is overlapped.
There is exist a workaround: company = dict(company).
The text was updated successfully, but these errors were encountered: