From 932356ff826f808421cde1f310f649f62ac45061 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 5 Dec 2022 20:58:17 +0100 Subject: [PATCH] =?utf8?q?=F0=9F=93=9D=20Add=20**kwargs=20parameter=20to?= =?utf8?q?=20follow=20the=20design=20in=20the=20final=20version=20of=20dat?= =?utf8?q?aclass=5Ftransform?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- typing_doc.md | 1 + 1 file changed, 1 insertion(+) diff --git a/typing_doc.md b/typing_doc.md index 0dcdb1c062..a92a0a76f2 100644 --- a/typing_doc.md +++ b/typing_doc.md @@ -42,6 +42,7 @@ This `doc()` function would receive several parameters for metadata and document * `discouraged: bool`: this would mark a parameter, class, function, or method as discouraged. Editors could display them similar to `deprecated`. The reason why having a `discouraged` apart from `deprecated` is that there are cases where something is not gonna be removed for backward compatibility, but it shouldn't be used in new code. An example of this is `datetime.utcnow()`. * `extra: dict`: a dictionary containing any additional metadata that could be useful for developers or library authors. * An `extra` parameter instead of `**kwargs` is proposed to allow adding future standard parameters. +* `**kwargs: Any`: allows arbitrary additional keyword args. This gives type checkers the freedom to support experimental parameters without needing to wait for changes in `typing.py`. Type checkers should report errors for any unrecognized parameters. This follows the same pattern designed in [PEP 681 – Data Class Transforms](https://peps.python.org/pep-0681/). Other possible future parameters could include: -- 2.47.3