Skip to content

Conversation

@jeffwidman
Copy link
Contributor

Be pedantic about checking for identity rather than equality to avoid issues like #1237 / 411bc08

Noticed while reviewing #1266

@jeffwidman jeffwidman requested a review from dpkp October 19, 2017 03:29
@jeffwidman jeffwidman force-pushed the check-for-none-rather-than-false branch from b08b1e4 to 95d33e0 Compare October 19, 2017 03:39
@tvoinarovskyi
Copy link
Collaborator

And it's faster anyway)

elif 'bootstrap' in self._conns:
return 'bootstrap'

return None
Copy link
Owner

Choose a reason for hiding this comment

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

Slight preference for keeping this as an explicit return. Otherwise we still return None, it is just implicit when the function completes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem, reverted.

Be pedantic about checking for identity rather than equality to avoid issues like #1237 / 411bc08
@jeffwidman jeffwidman force-pushed the check-for-none-rather-than-false branch from 95d33e0 to c72182e Compare October 19, 2017 20:25
@jeffwidman jeffwidman merged commit 0bd5d2a into master Oct 19, 2017
@jeffwidman jeffwidman deleted the check-for-none-rather-than-false branch October 19, 2017 20:25
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.

4 participants