From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 1 May 2021 00:30:38 +0000 (-0700) Subject: bpo-43971: Add spaces around annotated arg default '=' (GH-25702) X-Git-Tag: v3.9.5~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e48405a9be067d50d6d0d83dc22013fc68f15657;p=thirdparty%2FPython%2Fcpython.git bpo-43971: Add spaces around annotated arg default '=' (GH-25702) Result: "quantity_on_hand: int = 0". (cherry picked from commit e726a902b7c73a7056b7421d801e47ffff255873) Co-authored-by: Mohamed Moselhy Co-authored-by: Mohamed Moselhy --- diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index 6cd8d8ed0c26..8711191500c6 100644 --- a/Doc/library/dataclasses.rst +++ b/Doc/library/dataclasses.rst @@ -33,7 +33,7 @@ using :pep:`526` type annotations. For example this code:: Will add, among other things, a :meth:`__init__` that looks like:: - def __init__(self, name: str, unit_price: float, quantity_on_hand: int=0): + def __init__(self, name: str, unit_price: float, quantity_on_hand: int = 0): self.name = name self.unit_price = unit_price self.quantity_on_hand = quantity_on_hand