Document that dispatch caching is used
This commit is contained in:
parent
03020c215a
commit
ae76f771fc
|
@ -216,10 +216,11 @@ of, they are inserted in a predictable order::
|
|||
<class 'collections.abc.Iterable'>, <class 'collections.abc.Sized'>,
|
||||
<class 'object'>]
|
||||
|
||||
While this mode of operation is significantly slower, no caching is
|
||||
involved because user code may ``register()`` a new class on an ABC at
|
||||
any time. In such case, it is possible to create a situation with
|
||||
ambiguous dispatch, for instance::
|
||||
While this mode of operation is significantly slower, all dispatch
|
||||
decisions are cached. The cache is invalidated on registering new
|
||||
overloads on the generic function or when user code calls ``register()``
|
||||
on an ABC to register a new virtual subclass. In the latter case, it is
|
||||
possible to create a situation with ambiguous dispatch, for instance::
|
||||
|
||||
>>> from collections import Iterable, Container
|
||||
>>> class P:
|
||||
|
|
Loading…
Reference in New Issue