def __getitem__(self, key):
keyname, key, constants = _normalize_arg(key, self._constants)
return __class__(
'%s[%s]' % (self._pname, keyname),
ast.Subscript(
value=self._tree,
slice=ast.Index(value=key),
ctx=ast.Load(),
),
constants,
)
评论列表
文章目录