sync with O'Reilly Atlas

This commit is contained in:
Luciano Ramalho
2021-07-07 23:45:54 -03:00
parent f0f160844d
commit 23e78eeb82
64 changed files with 2087 additions and 124 deletions

View File

@@ -59,7 +59,8 @@ Creating new attributes at runtime is restricted as well::
...
AttributeError: 'Movie' has no attribute 'director'
The `_as_dict` instance creates a `dict` from the attributes of a `Movie` object::
The `_asdict` instance method creates a `dict` from the attributes
of a `Movie` object::
>>> movie._asdict()
{'title': 'The Godfather', 'year': 1972, 'box_office': 137.0}

View File

@@ -58,7 +58,8 @@ Creating new attributes at runtime is restricted as well::
...
AttributeError: 'Movie' object has no attribute 'director'
The `_as_dict` instance creates a `dict` from the attributes of a `Movie` object::
The `_asdict` instance method creates a `dict` from the attributes
of a `Movie` object::
>>> movie._asdict()
{'title': 'The Godfather', 'year': 1972, 'box_office': 137.0}

View File

@@ -58,7 +58,8 @@ Creating new attributes at runtime is restricted as well::
...
AttributeError: 'Movie' object has no attribute 'director'
The `_as_dict` instance creates a `dict` from the attributes of a `Movie` object::
The `_asdict` instance method creates a `dict` from the attributes
of a `Movie` object::
>>> movie._asdict()
{'title': 'The Godfather', 'year': 1972, 'box_office': 137.0}