Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
ligo-segments
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
ligo-segments
Commits
845aa210
Commit
845aa210
authored
Jul 24, 2020
by
Kipp Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
word-wrap a comment
parent
10b43320
Pipeline
#142622
failed with stages
in 9 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ligo/segments/__init__.py
ligo/segments/__init__.py
+8
-6
No files found.
ligo/segments/__init__.py
View file @
845aa210
...
...
@@ -382,14 +382,16 @@ class segment(tuple):
return
self
[
0
]
>=
other
#
# From <https://docs.python.org/3/reference/datamodel.html#object.__hash__>:
# From
# <https://docs.python.org/3/reference/datamodel.html#object.__hash__>:
#
# "if [a class] defines __eq__() but not __hash__(), its instances
will not
#
be usable as items in hashable collections... If a class that override
s
#
__eq__() needs to retain the implementation of __hash__() from a parent
#
class, the interpreter must be told this explicitly by setting __hash__ =
# <ParentClass>.__hash__."
# "if [a class] defines __eq__() but not __hash__(), its instances
#
will not be usable as items in hashable collections... If a clas
s
#
that overrides __eq__() needs to retain the implementation of
#
__hash__() from a parent class, the interpreter must be told this
#
explicitly by setting __hash__ =
<ParentClass>.__hash__."
#
__hash__
=
tuple
.
__hash__
# some arithmetic operations that (mostly) make sense for segments
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment