[Python-checkins] bpo-43971: Add spaces around annotated arg default '=' (GH-25702)

terryjreedy webhook-mailer at python.org
Fri Apr 30 20:31:07 EDT 2021


https://github.com/python/cpython/commit/606bb1c77c66eca081d03374ad4b53d9e603dd9d
commit: 606bb1c77c66eca081d03374ad4b53d9e603dd9d
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2021-04-30T20:31:00-04:00
summary:

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 <look4d at gmail.com>

Co-authored-by: Mohamed Moselhy <look4d at gmail.com>

files:
M Doc/library/dataclasses.rst

diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst
index 9b53372b3d3ab..c47ee0a932ae2 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



More information about the Python-checkins mailing list