8000 [3.9] bpo-43971: Add spaces around annotated arg default '=' (GH-25702) by miss-islington · Pull Request #25765 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.9] bpo-43971: Add spaces around annotated arg default '=' (GH-25702) #25765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-43971: Add spaces around annotated arg default '=' (GH-25702)
Result: "quantity_on_hand: int = 0".
(cherry picked from commit e726a90)

Co-authored-by: Mohamed Moselhy <look4d@gmail.com>
  • Loading branch information
moselhy authored and miss-islington committed Apr 30, 2021
commit 8ca086db28a141f8eea13e8cc0e38c692e8247f0
2 changes: 1 addition & 1 deletion Doc/library/dataclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
0