Created
August 31, 2016 18:11
-
-
Save photuris/709de6c86748cfea46550d0aebc65c52 to your computer and use it in GitHub Desktop.
What's the best PEP-8 practice for accessing nested dictionaries on multiple lines?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# snip... | |
# PyLint complains: C0330 Wrong continued identation. | |
result_set = (results_report['Results'] | |
['Metadata'] | |
['FooBarDefinitions'] | |
['BazBatDefinition']) | |
# Flake8 complains: E211 - whitespace before '[' | |
result_set = results_report['Results'] \ | |
['Metadata'] \ | |
['FooBarDefinitions'] \ | |
['BazBatDefinition'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment