summaryrefslogtreecommitdiffstats
path: root/lib/ply
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-12 08:30:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-01 15:27:55 +0100
commitd0f904d407f57998419bd9c305ce53e5eaa36b24 (patch)
tree47488e99b76374cddf1566cb8af3f3c32bd13b76 /lib/ply
parentbf25f05ce4db11466e62f134f9a6916f886a93d9 (diff)
downloadbitbake-contrib-d0f904d407f57998419bd9c305ce53e5eaa36b24.tar.gz
bitbake-contrib-d0f904d407f57998419bd9c305ce53e5eaa36b24.tar.bz2
bitbake-contrib-d0f904d407f57998419bd9c305ce53e5eaa36b24.zip
bitbake: Convert to python 3
Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/ply')
-rw-r--r--lib/ply/yacc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ply/yacc.py b/lib/ply/yacc.py
index 6168fd9a03..d50886ed2f 100644
--- a/lib/ply/yacc.py
+++ b/lib/ply/yacc.py
@@ -195,6 +195,8 @@ class YaccProduction:
self.lexer = None
self.parser= None
def __getitem__(self,n):
+ if isinstance(n,slice):
+ return [self[i] for i in range(*(n.indices(len(self.slice))))]
if n >= 0: return self.slice[n].value
else: return self.stack[n].value