contains
Return True if the "source" contains an instance of "inst". False, otherwise.
def contains(
source: object,
inst: type
) - > boolean
Return True if the "source" contains an instance of "inst". False, otherwise.
Parameters
| Name | Type | Description |
|---|---|---|
| source | object | The object or container to search through for the specified instance type |
| inst | type | The class or type to check for within the source structure |
Returns
| Type | Description |
|---|---|
boolean | True if the source or any of its nested elements are an instance of the specified type, False otherwise |