mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
[python/en] Clarify inheritance description (#4759)
This commit is contained in:
parent
7b4a50ac46
commit
cf670d3414
@ -826,8 +826,8 @@ if __name__ == "__main__":
|
|||||||
# variables from their parent class.
|
# variables from their parent class.
|
||||||
|
|
||||||
# Using the Human class defined above as the base or parent class, we can
|
# Using the Human class defined above as the base or parent class, we can
|
||||||
# define a child class, Superhero, which inherits the class variables like
|
# define a child class, Superhero, which inherits variables like "species",
|
||||||
# "species", "name", and "age", as well as methods, like "sing" and "grunt"
|
# "name", and "age", as well as methods, like "sing" and "grunt"
|
||||||
# from the Human class, but can also have its own unique properties.
|
# from the Human class, but can also have its own unique properties.
|
||||||
|
|
||||||
# To take advantage of modularization by file you could place the classes above
|
# To take advantage of modularization by file you could place the classes above
|
||||||
|
Loading…
Reference in New Issue
Block a user