Created
October 8, 2021 15:46
-
-
Save AlexWaygood/f9ae35eb43418a2e674826db516dc654 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional | |
from random import choice | |
class T: | |
def foo(self) -> None: | |
pass | |
var: Optional[T] = choice((None, T())) | |
var.foo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment