For example:
class FooBar:
def __init__(self):
self.a: int = None
self.foo: str = None
Is this bad practice/go against PEP guidelines or is it fine?
For example:
class FooBar:
def __init__(self):
self.a: int = None
self.foo: str = None
Is this bad practice/go against PEP guidelines or is it fine?
Why not require values in the constructor?
This is an example. For my actual use case, they would be private vars that would be set by class functions instead of passed to the constructor.