2
0
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:
Thomas Nagy 2012-09-11 00:03:54 +02:00
parent d51858100c
commit 5bc516a08d
2 changed files with 0 additions and 8 deletions

View File

@ -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)

View File

@ -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``