[Python-checkins] Fix dataclasses docstring typo. (gh-5118)

Eric V. Smith webhook-mailer at python.org
Sun Jan 7 08:19:53 EST 2018


https://github.com/python/cpython/commit/d327ae6ba157fb5118df28a86975c5ca523f05e2
commit: d327ae6ba157fb5118df28a86975c5ca523f05e2
branch: master
author: Eric V. Smith <ericvsmith at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-01-07T08:19:45-05:00
summary:

Fix dataclasses docstring typo. (gh-5118)

files:
M Lib/dataclasses.py

diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py
index 62b7c5ed70a..9e186c3c7b7 100644
--- a/Lib/dataclasses.py
+++ b/Lib/dataclasses.py
@@ -712,9 +712,9 @@ def make_dataclass(cls_name, fields, *, bases=(), namespace=None, init=True,
     The dataclass name will be 'cls_name'.  'fields' is an iterable
     of either (name), (name, type) or (name, type, Field) objects. If type is
     omitted, use the string 'typing.Any'.  Field objects are created by
-    calling 'field(name, type [, Field])'.
+    the equivalent of calling 'field(name, type [, Field-info])'.
 
-      C = make_class('C', [('a', int', ('b', int, Field(init=False))], bases=Base)
+      C = make_class('C', ['x', ('y', int'), ('z', int, Field(init=False))], bases=[Base])
 
     is equivalent to:
 



More information about the Python-checkins mailing list