This repository was archived by the owner on Jun 24, 2026. It is now read-only.
Fix bug, check for dunder#1303
Closed
offlinemark wants to merge 1 commit into
Closed
Conversation
allow sol funcs with 1 underscore, which is consistent with the above check in add_function
Member
|
For some reason travis hung :( |
Member
|
I restarted the build and it still hangs. Can it be that we fall in some infinite recursion here? |
|
|
||
| """ | ||
| if not name.startswith('_'): | ||
| if not name.startswith('__'): |
Member
There was a problem hiding this comment.
This check is wrong - the __private attributes are a syntax sugar for _CLS__private where CLS is the name of the class where a method that uses __private is defined.
In [9]: class A:
...: def foo_invoker(self):
...: print("A.foo_invoker")
...: self.__foo()
...:
...: def __foo(self):
...: print("A.foo")
...:
...: def __getattribute__(self, attr):
...: print(f"Getting {attr}")
...: return object.__getattribute__(self, attr)
...:
In [10]: A().foo_invoker()
Getting foo_invoker
A.foo_invoker
Getting _A__foo
A.foo
Member
There was a problem hiding this comment.
On the other hand, this would still need to check for all protected attributes (the one starting with _) that the EVMAccount/EVMContract defines.
I've proposed a better fix for the issue we want to fix in #1306.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
allow sol funcs with 1 underscore, which is consistent with the above check in add_function
This change is