__init__
PYL-W0201 40 })
41
42 def benchmark(self, title):
43 self.title = title 44 for c in self.competitors:
45 print(f"Benchmark::{c['name']}")
46
14
15 def finalize_options(self):
16 _bdist_wheel.finalize_options(self)
17 self.root_is_pure = False18
19except ImportError:
20 bdist_wheel = None
Defining an instance attribute outside __init__
affects the readability of code. It is expected to find all the attributes an instance may have by reading its __init__
method. If there is a need to initialize attribute via sub-initialization methods, it is recommended to assign attributes to None
in the init then call the sub-initialization methods.