]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43971: Add spaces around annotated arg default '=' (GH-25702)
authorMohamed Moselhy <look4d@gmail.com>
Fri, 30 Apr 2021 23:06:55 +0000 (19:06 -0400)
committerGitHub <noreply@github.com>
Fri, 30 Apr 2021 23:06:55 +0000 (19:06 -0400)
Result: "quantity_on_hand: int = 0".

Doc/library/dataclasses.rst

index e4d2b57fd429241e7d27de0310aecd53655656d4..0e8db5003f5fe4463c3b06cb32598b9c9d9e42fa 100644 (file)
@@ -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