Fix typos.

This commit is contained in:
Eric V. Smith 2017-11-30 08:22:07 -05:00
parent 2074efb171
commit 98e48b8c51
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ variables with type annotations as defined in PEP 526, "Syntax for
Variable Annotations". In this document, such variables are called Variable Annotations". In this document, such variables are called
fields. Using these fields, the decorator adds generated method fields. Using these fields, the decorator adds generated method
definitions to the class to support instance initialization, a repr, definitions to the class to support instance initialization, a repr,
comparisons methods, and optionally other methods as described in the comparison methods, and optionally other methods as described in the
Specification_ section. Such a class is called a Data Class, but Specification_ section. Such a class is called a Data Class, but
there's really nothing special about the class: the decorator adds there's really nothing special about the class: the decorator adds
generated methods to the class and returns the same class it was generated methods to the class and returns the same class it was
@ -83,7 +83,7 @@ to the InventoryItem class::
return (self.name, self.unit_price, self.quantity_on_hand) >= (other.name, other.unit_price, other.quantity_on_hand) return (self.name, self.unit_price, self.quantity_on_hand) >= (other.name, other.unit_price, other.quantity_on_hand)
return NotImplemented return NotImplemented
Data Classes saves you from writing and maintaining these methods. Data Classes save you from writing and maintaining these methods.
Rationale Rationale
========= =========