From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 1 May 2021 00:31:00 +0000 (-0700) Subject: bpo-43971: Add spaces around annotated arg default '=' (GH-25702) X-Git-Tag: v3.8.10~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=606bb1c77c66eca081d03374ad4b53d9e603dd9d;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 9b53372b3d3a..c47ee0a932ae 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