You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DISCUSSION: Implement Key.__eq__ and Entity.__eq__ #533
Can we simplify by saying that incomplete keys never compare equal to anything? We shoudn't expect them to be super long-lived anyway, and the use-cases seem strongly biased toward "real" equivalence.
Note that we need to implement __hash__ as well for many sensible uses of __eq__.
Activity
dhermes commentedon Jan 12, 2015
FWIW I have implemented
Key.__eq__in https://github.com/dhermes/gcloud-python/tree/key-comparison but it greatly depends on the conversation in #528tseaver commentedon Jan 12, 2015
Can we simplify by saying that incomplete keys never compare equal to anything? We shoudn't expect them to be super long-lived anyway, and the use-cases seem strongly biased toward "real" equivalence.
Note that we need to implement
__hash__as well for many sensible uses of__eq__.jgeewax commentedon Feb 3, 2015
Just had a chat with @dhermes about "what does equality mean?". The current thinking is:
if dataset_id.startswith(s~ or e~): dataset_id = dataset_id[2:])If people just want to compare the entity data, they can do a
dict(entity) ==If people just want to compare the key path, they can do a
key.path ==Merge pull request #615 from tseaver/533-key_and_entity_equality
Add sentiment analysis sample [(#533)](GoogleCloudPlatform/python-doc…
chore: Update gapic-generator-python to v1.11.2 (#533)
feat: provide new parameter cx_current_page, the unique identifier of…
chore(main): release 3.17.0 (#533)
chore(python): upgrade gcp-releasetool in .kokoro [autoapprove] (#533)
build(deps): [autoapprove] bump certifi from 2022.12.7 to 2023.7.22 (#…
chore: add prerelease nox session (#533)
fix: Ensure message fields are copied when building retry request (#533)
chore: release 0.28.1 (#533)
chore: [autoapprove] bump cryptography from 41.0.3 to 41.0.4 (#533)
chore: addressed lint issue with __version__ (#534)
chore(deps): update google-github-actions/setup-gcloud action to v0.5…
chore: release 1.5.2 (#533)
chore: release 1.17.2 (#533)
chore: release 2.10.0 (#533)
refactor: update parse functions, add unit tests (#533)
docs: add sample for read-only transactions (#533)
chore: drop use of 'pytz' in tests / examples (#534)