Skip Navigation

PEP: Is initializing typed variable with None bad practice?

For example:

 py
    
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?

Comments

27

Comments

27