Created
March 22, 2017 04:30
-
-
Save mnot/aec75455057e53f0783531bb21fbe519 to your computer and use it in GitHub Desktop.
This dies in a fire on 3.5.2, works on 3.6.
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
#!/usr/bin/env python | |
from typing import Optional, Type | |
class Foo(object): | |
pass | |
class Bar(Foo): | |
pass | |
def test_me() -> Optional[Type[Foo]]: | |
print("Hi there!") | |
return Bar | |
if __name__ == "__main__": | |
test_me() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also works on 3.5.3: