Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Dict unpacking propagates wrong type #412

Copy link
Copy link
@jakebailey

Description

@jakebailey
Issue body actions
a, b = {1: "x", 2.0: 1j}

The way iterable unpacking works, a and b should have types based on the keys of the dict, since that's what you get when you convert to the functionally equivalent:

d = {1: "x", 2.0: 1j}
it = iter(d)
a = it.next()
b = it.next()

But, we get:

image

image

a is being given the value type, and b probably the first value's type.

Likely related is what happens when changing this to:

a, *b = {1: "x", 2.0: 1j}

b has no type, but should be a list.

Found in #334.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't workinggenfrom the generated testsfrom the generated tests

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.