Skip to content

Conversation

tshepang
Copy link
Member

No description provided.

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

continue
a, b = line.split(": ", 1)
data[a] = b
return data
return data
Copy link
Contributor

@Stebalien Stebalien Apr 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, you can do this with a single comprehension:

with open(nightlies, 'r') as nightlies:
    return dict(
        line.split(": ", 1)
        for line in nightlies
        if line.strip() and not line.startswith('#')
    )

However, this is obviously a matter of style (and your way is probably more readable to someone who doesn't do a lot of functional programming).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting approach. Looks elegant.

@brson
Copy link
Contributor

brson commented May 31, 2016

@bors r+

@bors
Copy link
Collaborator

bors commented May 31, 2016

📌 Commit a422b7e has been approved by brson

@bors
Copy link
Collaborator

bors commented Jun 1, 2016

⌛ Testing commit a422b7e with merge 433d70c...

bors added a commit that referenced this pull request Jun 1, 2016
@bors bors merged commit a422b7e into rust-lang:master Jun 1, 2016
@tshepang tshepang deleted the python-love branch June 1, 2016 15:52
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.

5 participants