Skip to content

Instantly share code, notes, and snippets.

Created Mar 22, 2017
What would you like to do?
This dies in a fire on 3.5.2, works on 3.6.
#!/usr/bin/env python
from typing import Optional, Type
class Foo(object):
class Bar(Foo):
def test_me() -> Optional[Type[Foo]]:
print("Hi there!")
return Bar
if __name__ == "__main__":

This comment has been minimized.

Copy link

@jeamland jeamland commented Mar 22, 2017

Also works on 3.5.3:

benno@bjrbsd ~> uname -a
FreeBSD bjrbsd 12.0-CURRENT FreeBSD 12.0-CURRENT #3 r310121: Fri Dec 16 18:50:43 PST 2016     benno@bjrbsd:/src/obj/src/freebsd/sys/GENERIC-NODEBUG  amd64
benno@bjrbsd ~> python3 --version
Python 3.5.3
benno@bjrbsd ~> python3
Hi there!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment