Skip to content
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.

Undefined variable in dict comprehension  #960

Description

Example

import sys
from collections import defaultdict

def xx():
    dmap = defaultdict(list)
    sizes = {db:int(sz)//(1 << 20) for sz, db in [ln.split() for ln in open(sys.argv[1]).readlines()]}
    return {srv:sum([sizes[d] for d in dbs]) for srv,dbs in dmap.items()}

Undefined variable: 'dbs'

Activity

  1. jakebailey commented on Apr 15, 2019

    @jakebailey
    Member

    This is #830. If you'd like, you can try out the beta build to confirm:

    "python.analysis.downloadChannel": "beta"

    Closing as a duplicate for now.

  2. Yanpas commented on Apr 15, 2019

    @Yanpas
    Author

    I already have downloadChannel beta option on

  3. added
    bugSomething isn't working
    and removed
    duplicateThis issue or pull request already exists
    on Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions