From 281148b8eb5c42b775be55c6d401ade505b16276 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Wed, 23 Dec 2015 19:16:31 +0100 Subject: [PATCH] Removed the old __eq__ and __hash__ which are not useful anymore in recent interpreters --- waflib/Node.py | 8 -------- waflib/Task.py | 5 ----- 2 files changed, 13 deletions(-) diff --git a/waflib/Node.py b/waflib/Node.py index cee3c2ed..2a874b65 100644 --- a/waflib/Node.py +++ b/waflib/Node.py @@ -99,14 +99,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) - def __copy__(self): "Implemented to prevent nodes from being copied (raises an exception)" raise Errors.WafError('nodes are not supposed to be copied') diff --git a/waflib/Task.py b/waflib/Task.py index 26d5af14..e7629aa0 100644 --- a/waflib/Task.py +++ b/waflib/Task.py @@ -160,10 +160,6 @@ class TaskBase(evil): return self.fun.__name__ return self.__class__.__name__ - 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 keyword(self): if hasattr(self, 'fun'): return 'Function' @@ -508,7 +504,6 @@ class Task(TaskBase): self.uid_ = m.digest() return self.uid_ - def set_inputs(self, inp): """ Append the nodes to the *inputs*