Skip to content

Commit

Permalink
Use interpreter output, not comments, like with Dog example
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja authored and JosephSBoyle committed Dec 24, 2022
1 parent dde7890 commit a3a1750
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/tutorial/classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,9 @@ is to use :mod:`dataclasses` for this purpose::
john = Employee("john", "computer lab", 1000)

>>> john.dept
# "computer lab"
"computer lab"
>>> john.salary
# '1000'
1000

A piece of Python code that expects a particular abstract data type can often be
passed a class that emulates the methods of that data type instead. For
Expand Down

0 comments on commit a3a1750

Please sign in to comment.