Commit 845aa210 authored by Kipp Cannon's avatar Kipp Cannon

word-wrap a comment

parent 10b43320
Pipeline #142622 failed with stages
in 9 minutes and 46 seconds
...@@ -382,14 +382,16 @@ class segment(tuple): ...@@ -382,14 +382,16 @@ class segment(tuple):
return self[0] >= other 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 # "if [a class] defines __eq__() but not __hash__(), its instances
# be usable as items in hashable collections... If a class that overrides # will not be usable as items in hashable collections... If a class
# __eq__() needs to retain the implementation of __hash__() from a parent # that overrides __eq__() needs to retain the implementation of
# class, the interpreter must be told this explicitly by setting __hash__ = # __hash__() from a parent class, the interpreter must be told this
# <ParentClass>.__hash__." # explicitly by setting __hash__ = <ParentClass>.__hash__."
# #
__hash__ = tuple.__hash__ __hash__ = tuple.__hash__
# some arithmetic operations that (mostly) make sense for segments # some arithmetic operations that (mostly) make sense for segments
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment