From d0f904d407f57998419bd9c305ce53e5eaa36b24 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 12 May 2016 08:30:35 +0100 Subject: 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 --- lib/ply/yacc.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/ply') diff --git a/lib/ply/yacc.py b/lib/ply/yacc.py index 6168fd9a0..d50886ed2 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 -- cgit 1.2.3-korg