先贴链接:Constructs
Supported constructs:
- conditional branch:
if .. elif .. else
- loops:
while
,for .. in
,break
,continue
- basic generator:
yield
- assertion:
assert
Partially supported constructs:
- exceptions:
try .. except
,raise
,else
andfinally
(See details in this section) - context manager:
with
(only support numba.objmode()) - list comprehension (see details in this section)
Unsupported constructs:
- async features:
async with
,async for
andasync def
- class definition:
class
(except for @jitclass) - set, dict and generator comprehensions
- generator delegation:
yield from
能够看到,numba 不反对 dict!!!
所以 numba 的最大的毛病就是不反对 dict