From 624cdc9e5b1e63307728f60f00162d3555294481 Mon Sep 17 00:00:00 2001 From: Lucas Mirelmann Date: Sat, 31 Jan 2026 20:09:29 +0100 Subject: [PATCH] Remove error condition on dict.get MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove claim that dict·get would produce an error if the dictionary is frozen or has active iterators. dict·get is a read operation and as such does produce an error when frozen or with an active iterator. None of the implementations produce an error in this case. --- spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.md b/spec.md index 7707b3e..9cfb252 100644 --- a/spec.md +++ b/spec.md @@ -3721,7 +3721,7 @@ print(x) # {} If the dictionary contains no such value, `get` returns `None`, or the value of the optional `default` parameter if present. -`get` fails if `key` is unhashable, or the dictionary is frozen or has active iterators. +`get` fails if `key` is unhashable. ```python x = {"one": 1, "two": 2}