Skip to content

Commit

Permalink
Fix py2-pyxml SyntaxErrors on ParsedAbbreviatedRelativeLocationPath.p…
Browse files Browse the repository at this point in the history
…y and

ParsedAbbreviatedAbsoluteLocationPath.py, where 'as' Python keyword is used
for a variable name.
  • Loading branch information
David Abdurachmanov committed Dec 14, 2011
1 parent e8a9c0b commit 7631185
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions py2-pyxml-fix-as-keyword-usage-as-variable.patch
@@ -0,0 +1,28 @@
diff -rupN xml.orig/xpath/ParsedAbbreviatedAbsoluteLocationPath.py xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py
--- xml.orig/xpath/ParsedAbbreviatedAbsoluteLocationPath.py 2011-12-14 14:01:09.000000000 +0100
+++ xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py 2011-12-14 14:01:39.000000000 +0100
@@ -24,8 +24,8 @@ class ParsedAbbreviatedAbsoluteLocationP
self._rel = rel
nt = ParsedNodeTest.ParsedNodeTest('node', '')
ppl = ParsedPredicateList.ParsedPredicateList([])
- as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
- self._step = ParsedStep.ParsedStep(as, nt, ppl)
+ pas = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
+ self._step = ParsedStep.ParsedStep(pas, nt, ppl)
return

def evaluate(self, context):
diff -rupN xml.orig/xpath/ParsedAbbreviatedRelativeLocationPath.py xml/xpath/ParsedAbbreviatedRelativeLocationPath.py
--- xml.orig/xpath/ParsedAbbreviatedRelativeLocationPath.py 2011-12-14 14:01:09.000000000 +0100
+++ xml/xpath/ParsedAbbreviatedRelativeLocationPath.py 2011-12-14 14:02:06.000000000 +0100
@@ -28,8 +28,8 @@ class ParsedAbbreviatedRelativeLocationP
self._right = right
nt = ParsedNodeTest.ParsedNodeTest('node','')
ppl = ParsedPredicateList.ParsedPredicateList([])
- as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
- self._middle = ParsedStep.ParsedStep(as, nt, ppl)
+ pas = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
+ self._middle = ParsedStep.ParsedStep(pas, nt, ppl)

def evaluate(self, context):
res = []

0 comments on commit 7631185

Please sign in to comment.