From 0ac6577bb16c432695d1633fa9e1f6ed3154a2f0 Mon Sep 17 00:00:00 2001 From: RYAN AKMAL PASYA Date: Mon, 28 Sep 2026 20:07:24 +0700 Subject: [PATCH] Add note that csv.Dialect is usually the wrong class --- stdlib/csv.pyi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stdlib/csv.pyi b/stdlib/csv.pyi index f8ab5f000a04..751e85566f88 100644 --- a/stdlib/csv.pyi +++ b/stdlib/csv.pyi @@ -54,6 +54,10 @@ if sys.version_info < (3, 13): _T = TypeVar("_T") +# Note that this is often the wrong class: it is only useful for sub-classing +# (e.g. csv.excel). Dialect objects returned at runtime, such as the return +# value of get_dialect(), are usually _csv.Dialect, which is not a subclass +# of csv.Dialect. class Dialect: delimiter: str quotechar: str | None