Closed vickumar1981 closed 3 years ago
Using type hinting, you can't specify the type parameter to any of the classes.
i.e.:
def find_person(id: int) -> Option: # pass
will work, but
def find_person(id: int) -> Option[string]: # doesn't work, should
will not work.
Expect to be able to pass the type parameters via type hinting. Python's Iterable and List do this, for example.
Iterable
List
An exception is thrown: 'type' object is not subscriptable
'type' object is not subscriptable
import pyeffects.Option.* def find_person(id: int) -> Option[string]: pass
1.0.4
Using type hinting, you can't specify the type parameter to any of the classes.
i.e.:
will work, but
will not work.
Expected Result
Expect to be able to pass the type parameters via type hinting. Python's
Iterable
andList
do this, for example.Actual Result
An exception is thrown:
'type' object is not subscriptable
Reproduction Steps