From 798f9be67188dd299491c897eb285a63fd9b8fde Mon Sep 17 00:00:00 2001 From: Rebecca Chen Date: Sun, 4 Feb 2024 23:35:28 -0800 Subject: [PATCH] PEP 705: fix typo in "Motivation" section. --- peps/pep-0705.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0705.rst b/peps/pep-0705.rst index 222da40e298..c77062e6a58 100644 --- a/peps/pep-0705.rst +++ b/peps/pep-0705.rst @@ -118,7 +118,7 @@ However, this no longer works once you start nesting dictionaries:: d["name"] = name update_metadata_timestamp(d) # Type check error: "metadata" is not of type HasTimestamp -This looks like an error, but is simply due to the (unwanted) ability to overwrite the ``metadata`` item held by the ``HasTimestampedMetadata`` instance with a different ``HasTimestamp`` instance, that may no longer be a ``UserAudit`` instance. +This looks like an error, but is simply due to the (unwanted) ability to overwrite the ``metadata`` item held by the ``HasTimestampedMetadata`` instance with a different ``HasTimestamp`` instance, that may no longer be a ``Logs`` instance. It is possible to work around this issue with generics (as of Python 3.11), but it is very complicated, requiring a type parameter for every nested dict.