Files
openide/python/testData/inspections/PyCompatibilityInspection/ellipsisInSubscriptionPy2.py
Andrey Vlasovskikh 377662303c Fixed parsing ellipsis as an expression in Python 3 (PY-8257)
In Python 3 ellipsis can appear anywhere, not only in sequence slicings. The parser
now always passes ellipsis, it's incorrect use is detected at the unsupported features
annotator or compatibility inspection levels.
2013-02-18 16:08:33 +04:00

6 lines
88 B
Python

import numpy
x = numpy.zeros((3, 4, 5))
y = x[..., 0] # pass
y = x[..., 0, :] # pass