]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43971: Add spaces around annotated arg default '=' (GH-25702)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 1 May 2021 00:31:00 +0000 (17:31 -0700)
committerGitHub <noreply@github.com>
Sat, 1 May 2021 00:31:00 +0000 (20:31 -0400)
Result: "quantity_on_hand: int = 0".
(cherry picked from commit e726a902b7c73a7056b7421d801e47ffff255873)

Co-authored-by: Mohamed Moselhy <look4d@gmail.com>
Co-authored-by: Mohamed Moselhy <look4d@gmail.com>
Doc/library/dataclasses.rst

index 9b53372b3d3abe0b002235fdfad01a2c30043315..c47ee0a932ae24c8ce46335210bad32338baf034 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