September 2026
1051 pages
35h 4m
English
From Chapter 17, Section 17.14, you already know about many built-in functions, which are available to the programmer at any time. In the overview in Chapter 17, Section 17.14, we intentionally left out built-in functions that relate to object-oriented programming in order to discuss them here. Table 19.2 lists those built-in functions that are specifically related to objects and classes.
|
Name |
Description |
|---|---|
|
getattr(object, name, [default]) |
Returns the value of the name attribute of the object instance. |
|
setattr(object, name, value) |
Sets the value of the name attribute of the object instance to the value value. |
|
hasattr(object, name) |
Checks whether the object instance ... |
Read now
Unlock full access