]> granicus.if.org Git - python/commitdiff
Fix dataclasses docstring typo. (gh-5118)
authorEric V. Smith <ericvsmith@users.noreply.github.com>
Sun, 7 Jan 2018 13:19:45 +0000 (08:19 -0500)
committerGitHub <noreply@github.com>
Sun, 7 Jan 2018 13:19:45 +0000 (08:19 -0500)
Lib/dataclasses.py

index 62b7c5ed70ac73fa2ff312dc603050549ac1da0c..9e186c3c7b7351bcda5eb28cb9198f1b8325f52a 100644 (file)
@@ -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: