File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -353,19 +353,23 @@ Importing Modules
353353
354354 .. versionadded:: next
355355
356- .. c:function:: PyObject* PyImport_SetLazyImportsMode(PyImport_LazyImportsMode mode)
356+ .. c:function:: int PyImport_SetLazyImportsMode(PyImport_LazyImportsMode mode)
357357
358358 Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded
359359 strings instead of Python :class:`str` objects.
360360
361+ This function always returns ``0``.
362+
361363 .. versionadded:: next
362364
363- .. c:function:: PyObject* PyImport_SetLazyImportsFilter(PyObject *filter)
365+ .. c:function:: int PyImport_SetLazyImportsFilter(PyObject *filter)
366+
367+ Sets the current lazy imports filter. The *filter * should be a callable that
368+ will receive ``(importing_module_name, imported_module_name, [fromlist]) ``
369+ when an import can potentially be lazy and that must return ``True `` if
370+ the import should be lazy and ``False `` otherwise.
364371
365- Sets the current lazy imports filter. The function should be a callable that
366- will receive (importing_module_name, imported_module_name, [fromlist]) when
367- an import can potentially be lazy. Returns ``True`` if the import should be lazy
368- or ``False`` otherwise.
372+ Return ``0 `` on success and ``-1 `` with an exception set otherwise.
369373
370374 .. versionadded :: next
371375
You can’t perform that action at this time.
0 commit comments