From 2853156a2bce535bcaa440c37cf872916f76c03b Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Thu, 3 Jan 2013 08:10:25 +0000 Subject: Refactoring, rename isNil to isNull. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1428206 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/hosting/server/util.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sca-cpp/trunk/hosting/server/util.py') diff --git a/sca-cpp/trunk/hosting/server/util.py b/sca-cpp/trunk/hosting/server/util.py index 791951a71c..bd37eb11af 100644 --- a/sca-cpp/trunk/hosting/server/util.py +++ b/sca-cpp/trunk/hosting/server/util.py @@ -57,9 +57,9 @@ def reverse(l): r.reverse() return tuple(r) -def isNil(l): +def isNull(l): if isinstance(l, streampair): - return l.isNil() + return l.isNull() return l is None or l == () def isSymbol(v): @@ -76,7 +76,7 @@ def isList(v): return True def isTaggedList(v, t): - return isList(v) and not isNil(v) and car(v) == t + return isList(v) and not isNull(v) and car(v) == t # Scheme-like streams @@ -88,7 +88,7 @@ class streampair(object): def __repr__(self): return repr(self[0:len(self)]) - def isNil(self): + def isNull(self): return self.cdr == () def __len__(self): @@ -102,7 +102,7 @@ class streampair(object): return self.cdr()[i - 1] def __getslice__(self, i, j): - if isNil(self): + if isNull(self): return () if i > 0: if j == maxint: @@ -156,7 +156,7 @@ def curry(f, *args): # Convert a path represented as a list of values to a string def path(p): - if isNil(p): + if isNull(p): return "" return "/" + car(p) + path(cdr(p)) -- cgit v1.2.3