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

Siddata caching affects len #826

Merged
merged 2 commits into from Nov 10, 2015
Merged

Siddata caching affects len #826

merged 2 commits into from Nov 10, 2015

Conversation

@llllllllll
Copy link
Contributor

@llllllllll llllllllll commented Nov 10, 2015

When we cache the two methods on the instance, we need to update the initial_len to account for these untracked attributes in the dict.

Long term goal of removing __len__ and __contains__ from this object, it is not a container.

# without affecting the `__len__` of the object. This is important
# because we use the `len` of the `SIDData` object to see if we have
# data for this asset.
self._initial_len += 2

This comment has been minimized.

@richafrank

richafrank Nov 10, 2015
Member

Fun stuff. LGTM, given the current framework.

@llllllllll llllllllll force-pushed the siddata-caching-affects-len branch from 8a7e79a to 1aeae88 Nov 10, 2015
@llllllllll
Copy link
Contributor Author

@llllllllll llllllllll commented Nov 10, 2015

rebased, merging on pass

@llllllllll llllllllll merged commit 1aeae88 into master Nov 10, 2015
2 checks passed
2 checks passed
Scrutinizer 4 updated code elements
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@llllllllll llllllllll deleted the siddata-caching-affects-len branch Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.