MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / subclasses

Function subclasses

17-it-generator/tree/extra/drawtree.py:10–14  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

8
9
10def subclasses(cls):
11 try:
12 return cls.__subclasses__()
13 except TypeError: # handle the `type` type
14 return cls.__subclasses__(cls)
15
16
17def tree(cls, level=0, last_sibling=True):

Callers 1

treeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected