Skip to content

No crash when encountering weakly typed namedtuple#6

Open
flying-sheep wants to merge 1 commit into
prechelt:masterfrom
flying-sheep:patch-1
Open

No crash when encountering weakly typed namedtuple#6
flying-sheep wants to merge 1 commit into
prechelt:masterfrom
flying-sheep:patch-1

Conversation

@flying-sheep

Copy link
Copy Markdown

No description provided.

@OJFord

OJFord commented Jul 22, 2016

Copy link
Copy Markdown

I just encountered this too, would be great if this could be merged @prechelt.

@OJFord

OJFord commented Jul 22, 2016

Copy link
Copy Markdown

Actually, it just hits an error further down the line.

I've found a workaround though:

import typecheck as tc
from collections import namedtuple

NT = namedtuple('NT', 'x')

@tc.typecheck
def foobar(nt: lambda x: isinstance(x, NT)):
    pass

@ghost ghost self-assigned this Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants