Skip to content

Commit 77d5aa1

Browse files
committed
BUG: add compat check pandas-dev#32766
1 parent 21af1c9 commit 77d5aa1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/core/computation/expr.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
import numpy as np
1212

13+
from pandas.compat import PY39
14+
1315
import pandas.core.common as com
1416
from pandas.core.computation.ops import (
1517
_LOCAL_TAG,
@@ -196,6 +198,9 @@ def _filter_nodes(superclass, all_nodes=_all_nodes):
196198
_keyword_nodes = _filter_nodes(ast.keyword)
197199
_alias_nodes = _filter_nodes(ast.alias)
198200

201+
if not PY39:
202+
_slice_nodes = _filter_nodes(ast.slice)
203+
199204

200205
# nodes that we don't support directly but are needed for parsing
201206
_hacked_nodes = frozenset(["Assign", "Module", "Expr"])

0 commit comments

Comments
 (0)