Skip to content
This repository was archived by the owner on Apr 14, 2020. It is now read-only.

flake8 check#60

Open
cxhernandez wants to merge 1 commit intomasterfrom
flake8
Open

flake8 check#60
cxhernandez wants to merge 1 commit intomasterfrom
flake8

Conversation

@cxhernandez
Copy link
Copy Markdown

Mostly aesthetics, but lines like this seemed incorrect:

if not field in self_cls.fields:

Any reason why it's not this?

if field not in self_cls.fields:

@peastman
Copy link
Copy Markdown

They're synonymous. Think of it as if not (field in self_cls.fields).

@cxhernandez
Copy link
Copy Markdown
Author

Ohhh— thanks! I was thinking not would be executed before in.

@mpharrigan
Copy link
Copy Markdown

The latter might be faster? it can short circuit

@peastman
Copy link
Copy Markdown

I don't think there would be any difference. Determining whether something is in a container is identical to determining whether it is not in the container. The only difference is inverting the return value.

@mpharrigan
Copy link
Copy Markdown

doh!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants