These are chat archives for evhub/coconut

6th
Jan 2018
Jason O.
@puruzio
Jan 06 2018 07:22
Trying to wrap my head around types in coconut. I thought the following will result in a type error (in the line marked <<<—) because the first argument isn’t a list of string, but it doesn’t (no mypy error). Why?
data Model(entries: str[], ip: str, num: int):
    def __abs__(self):
        return "abc"

def numf(x: int, mdl: Model) -> str:
    return mdl.ip

nonmodel = Model("Song name 1", "192.168.1.1", 169) <<<--

print(numf(1, nonmodel))