Skip to content

Commit 814dbab

Browse files
committed
PEP 681: Copyedit for minor formatting/textual issues
1 parent e13edd0 commit 814dbab

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ PEP 681: Data Class Transforms
356356
:data:`~typing.dataclass_transform` may be used to
357357
decorate a class, metaclass, or a function that is itself a decorator.
358358
The presence of ``@dataclass_transform()`` tells a static type checker that the
359-
decorated object performs runtime "magic" that
360-
transforms a class, giving it :func:`dataclasses.dataclass`-like behaviors.
359+
decorated object performs runtime "magic" that transforms a class,
360+
giving it :func:`dataclass <dataclasses.dataclass>`-like behaviors.
361361

362362
For example::
363363

@@ -369,14 +369,13 @@ For example::
369369
cls.__ne__ = ...
370370
return cls
371371

372-
# The create_model decorator can now be used to create new model
373-
# classes, like this:
372+
# The create_model decorator can now be used to create new model classes:
374373
@create_model
375374
class CustomerModel:
376375
id: int
377376
name: str
378377

379-
c = CustomerModel(id=327, name="John Smith")
378+
c = CustomerModel(id=327, name="Eric Idle")
380379

381380
See :pep:`681` for more details.
382381

0 commit comments

Comments
 (0)