None is a true singleton in Python 2.4 and the parser disallows

any assignments or use as parameter. Rename the parameters as workaround.
This commit is contained in:
joerg 2006-06-06 19:26:30 +00:00
parent 1b717c210d
commit 2dfe63b965
2 changed files with 72 additions and 1 deletions

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.4 2005/02/24 14:48:48 agc Exp $
$NetBSD: distinfo,v 1.5 2006/06/06 19:26:30 joerg Exp $
SHA1 (HappyDoc_r2_1.tar.gz) = f1b22586d358af6679b09bf475a05e49742aa358
RMD160 (HappyDoc_r2_1.tar.gz) = f615f72138fe7d5c1e77c89da43c23e5f2fe9e0f
Size (HappyDoc_r2_1.tar.gz) = 523968 bytes
SHA1 (patch-aa) = aa041e3fd3d7306ea0fe739d624dcabd83f80220
SHA1 (patch-ab) = 0525875376f4ef7c71ab9f40ba6774f6f725ef93

View file

@ -0,0 +1,70 @@
$NetBSD: patch-ab,v 1.1 2006/06/06 19:26:30 joerg Exp $
--- happydoclib/docstring/StructuredText/STDOM.py.orig 2006-06-06 19:20:54.000000000 +0000
+++ happydoclib/docstring/StructuredText/STDOM.py
@@ -171,7 +171,7 @@ class NodeWrapper(ParentNode):
type=type,
st=type(''),
getattr=getattr,
- None=None):
+ My_None=None):
"""
The node immediately preceding this node. If
@@ -180,17 +180,17 @@ class NodeWrapper(ParentNode):
children = self.aq_parent.getChildren()
if not children:
- return None
+ return My_None
- index=getattr(self, '_DOMIndex', None)
- if index is None:
+ index=getattr(self, '_DOMIndex', My_None)
+ if index is My_None:
index=self._getDOMIndex(children)
- if index is None: return None
+ if index is My_None: return My_None
index=index-1
- if index < 0: return None
+ if index < 0: return My_None
try: n=children[index]
- except IndexError: return None
+ except IndexError: return My_None
else:
if type(n) is st:
n=TextNode(n)
@@ -243,9 +243,9 @@ class NodeWrapper(ParentNode):
type=type,
st=type(''),
getattr=getattr,
- None=None):
+ My_None=None):
- return self.getPreviousSibling(type,st,getattr,None)
+ return self.getPreviousSibling(type,st,getattr,My_None)
def _get_NextSibling(self, type=type, st=type('')):
return self.getNextSibling(type,st)
@@ -292,7 +292,7 @@ class Node(ParentNode):
type=type,
st=type(''),
getattr=getattr,
- None=None):
+ My_None=None):
"""
The node immediately preceding this node. If
there is no such node, this returns None.
@@ -346,9 +346,9 @@ class Node(ParentNode):
type=type,
st=type(''),
getattr=getattr,
- None=None):
+ My_None=None):
- return self.getPreviousSibling(type,st,getattr,None)
+ return self.getPreviousSibling(type,st,getattr,My_None)
def _get_NextSibling(self, type=type, st=type('')):
return self.getNextSibling()