Skip to content

Commit

Permalink
Add docstring on prefer_literal
Browse files Browse the repository at this point in the history
  • Loading branch information
sklam committed Aug 4, 2020
1 parent 6a4fe0f commit 89a3840
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions numba/core/extending.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ def len_impl(seq):
holds the information from the callee. The function should return Truthy
to determine whether to inline, this essentially permitting custom
inlining rules (typical use might be cost models).
The *prefer_literal* option allows users to control if literal types should
be tried first or last. The default (`False`) is to use non-literal types.
Implementation that can specialize base on literal values should set the
option to `True`. Note, this option maybe expanded in the near future to
allow for more control (e.g. disabling non-literal types).
"""
from numba.core.typing.templates import make_overload_template, infer_global

Expand Down

0 comments on commit 89a3840

Please sign in to comment.