mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-26 20:01:13 +01:00
Dead code: __hash__ does return the id of the current object by default
This commit is contained in:
parent
d51858100c
commit
5bc516a08d
@ -130,10 +130,6 @@ class Node(object):
|
||||
"String representation (abspath), for debugging purposes"
|
||||
return self.abspath()
|
||||
|
||||
def __hash__(self):
|
||||
"Node hash, used for storage in dicts. This hash is not persistent."
|
||||
return id(self)
|
||||
|
||||
def __eq__(self, node):
|
||||
"Node comparison, based on the IDs"
|
||||
return id(self) == id(node)
|
||||
|
@ -190,10 +190,6 @@ class TaskBase(evil):
|
||||
return 'executing: %s\n' % self.fun.__name__
|
||||
return self.__class__.__name__ + '\n'
|
||||
|
||||
def __hash__(self):
|
||||
"Very fast hashing scheme but not persistent (replace/implement in subclasses and see :py:meth:`waflib.Task.Task.uid`)"
|
||||
return id(self)
|
||||
|
||||
def exec_command(self, cmd, **kw):
|
||||
"""
|
||||
Wrapper for :py:meth:`waflib.Context.Context.exec_command` which sets a current working directory to ``build.variant_dir``
|
||||
|
Loading…
Reference in New Issue
Block a user