From ae76f771fc3fba131250e8e4ac2a6b45494adf3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Sat, 25 May 2013 22:06:02 +0200 Subject: [PATCH] Document that dispatch caching is used --- pep-0443.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pep-0443.txt b/pep-0443.txt index ce5268803..9fdde6786 100644 --- a/pep-0443.txt +++ b/pep-0443.txt @@ -216,10 +216,11 @@ of, they are inserted in a predictable order:: , , ] -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: