From 96a70e131616a690301f7e18b75010ed661646c4 Mon Sep 17 00:00:00 2001 From: Wapaul1 Date: Mon, 1 Aug 2016 16:56:54 -0700 Subject: [PATCH] Changed equality to None in worker.py to use is keyword (#335) --- lib/python/ray/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/ray/worker.py b/lib/python/ray/worker.py index 536048226..398baaafe 100644 --- a/lib/python/ray/worker.py +++ b/lib/python/ray/worker.py @@ -377,7 +377,7 @@ class Worker(object): elif isinstance(result, np.generic): return result # TODO(pcm): close the associated memory segment; if we don't, this leaks memory (but very little, so it is ok for now) - elif result == None: + elif result is None: ray.lib.unmap_object(self.handle, segmentid) # need to unmap here because result is passed back "by value" and we have no reference to unmap later return None # can't subclass None and don't need to because there is a global None result.ray_objectid = objectid # TODO(pcm): This could be done only for the "get" case in the future if we want to increase performance