Skip to content

Commit 6608ac2

Browse files
committed
Documentation typo.
Refs #118.
1 parent 4b11af0 commit 6608ac2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/examples.ipynb

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"metadata": {},
66
"source": [
77
"# Examples\n",
8-
"## mutlimethod\n",
8+
"## multimethod\n",
99
"Multimethods are a mapping of signatures (tuple of types) to functions. They maintain an efficient dispatch tree, and cache the called signatures."
1010
]
1111
},
@@ -68,18 +68,18 @@
6868
"\n",
6969
"\n",
7070
"@multimethod\n",
71-
"def chunks(values: Iterable, size):\n",
71+
"def batched(values: Iterable, size):\n",
7272
" it = iter(values)\n",
7373
" return iter(lambda: list(itertools.islice(it, size)), [])\n",
7474
"\n",
7575
"\n",
7676
"@multimethod\n",
77-
"def chunks(values: Sequence, size):\n",
77+
"def batched(values: Sequence, size):\n",
7878
" for index in range(0, len(values), size):\n",
7979
" yield values[index : index + size]\n",
8080
"\n",
8181
"\n",
82-
"list(chunks(iter('abcde'), 3))"
82+
"list(batched(iter('abcde'), 3))"
8383
]
8484
},
8585
{
@@ -88,7 +88,7 @@
8888
"metadata": {},
8989
"outputs": [],
9090
"source": [
91-
"list(chunks('abcde', 3))"
91+
"list(batched('abcde', 3))"
9292
]
9393
},
9494
{
@@ -241,7 +241,7 @@
241241
"name": "python",
242242
"nbconvert_exporter": "python",
243243
"pygments_lexer": "ipython3",
244-
"version": "3.12.1"
244+
"version": "3.12.3"
245245
}
246246
},
247247
"nbformat": 4,

multimethod/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class multidispatch(multimethod, dict[tuple[type, ...], Callable[..., RETURN]]):
400400
signature: Optional[inspect.Signature]
401401

402402
def __new__(cls, func: Callable[..., RETURN]) -> "multidispatch[RETURN]":
403-
return functools.update_wrapper(dict.__new__(cls), func)
403+
return functools.update_wrapper(dict.__new__(cls), func) # type: ignore
404404

405405
def __init__(self, func: Callable[..., RETURN]) -> None:
406406
self.pending = set()

0 commit comments

Comments
 (0)