Skip to content

NamedTuple doesn't accept field called count #3950

Closed
@Daenyth

Description

@Daenyth
from typing import *
class Foo(NamedTuple):
    count: int
foo.py:3: error: Incompatible types in assignment (expression has type "int", base class "tuple" defined the type as Callable[[Tuple[Any, ...], Any], int])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions