Skip to content

NamedTuple._replace() #2143

Closed
Closed

Description

@smessmer

NamedTuple has some public functions starting with an underscore, see https://docs.python.org/2/library/collections.html

When I try to use them, mypy complains with

error: "MyType" has no attribute "_replace"

Activity

  1. gvanrossum commented on Sep 15, 2016

    @gvanrossum
    Member

    This should be fixed in the repo already, in #1810. You should be able to install straight from the repo, like this:

    pip3 install -U git+git://github.com/python/mypy.git
    
  2. smessmer commented on Sep 15, 2016

    @smessmer
    Author

    Thanks, sorry didn't see that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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