mirror of
https://git.mirrors.martin98.com/https://github.com/petaflot/pygcode
synced 2025-09-16 01:33:14 +08:00
commit
0578fa5d81
@ -211,6 +211,14 @@ class GCode(object):
|
|||||||
parameters=param_str,
|
parameters=param_str,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
"""Hash representation of the gcode, for set and dictionary usage"""
|
||||||
|
try:
|
||||||
|
return hash(self.word_key)
|
||||||
|
except TypeError:
|
||||||
|
return hash(self.word_letter) # May also want to retrieve additional value info
|
||||||
|
|
||||||
|
|
||||||
def _default_word(self):
|
def _default_word(self):
|
||||||
if self.default_word:
|
if self.default_word:
|
||||||
return copy(self.default_word)
|
return copy(self.default_word)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user