Skip to content
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

Ensure that constructing a Table is O(schema) not O(schema**2) #4909

Closed
tpoterba opened this issue Dec 6, 2018 · 0 comments · Fixed by #4914
Closed

Ensure that constructing a Table is O(schema) not O(schema**2) #4909

tpoterba opened this issue Dec 6, 2018 · 0 comments · Fixed by #4914

Comments

@tpoterba
Copy link
Collaborator

@tpoterba tpoterba commented Dec 6, 2018

The following method on ExprContainer seems quadratic due to usage of dir:

    def _set_field(self, key, value):
        self._fields[key] = value
        self._fields_inverse[value] = key
        if key in dir(self):
            warn(f"Name collision: field {repr(key)} already in object dict. "
                 "This field must be referenced with indexing syntax")
        else:
            self.__dict__[key] = value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant