Category "pep8"

Is it PEP8-appropriate to replace words into numbers (e.g. book4students, key2value, etc.) in my function names?

I am relatively new in the programming community, and recently I acknowledged the existence of PEP8, a sort-of codex which aims to improve readability. As liste

Long return type hint and pep8

I have a function that raises an E501 line too long (86 > 79 characters) warning when running pycodestyle. def my_function(arg1: list = None) -> Tuple[pd.

What is the recommended way to break long if statement? (W504 line break after binary operator)

What is currently the recommended way to break a long line of if statement with "and" and "or" operators? 1st option With the style below (which is from PEP8) w

How to enable PEP8 inspection in PyCharm IDE, except for using 2 spaces for indents? [duplicate]

I've been using PyCharm IDE a lot recently when working with the TensorFlow Python repository. TensorFlow follows the PEP8 Python style guide,

Pycharm's code style inspection: ignore/switch off specific rules

I'm trying to import existing project into PyCharm. I can refactor the code so that PyCharm will be pleased, but we like to have spaces around colons in diction

2-sum problem: given an unsorted list of ints, find if two elements sum to a given target. How to make my code more Pythonic?

I'm trying to learn about PEP-8 guidelines, writing Pythonic code, and about Python's standard libraries (am a day into this journey). Suggestions to make the f

Pythonic implementation of quiet / verbose flag for functions

In an effort to write pythonic code, I wonder is there a style guide covering the use of quiet or verbose options for functions. For example, in my Python pack

PEP8 guidance for column names in pandas dataframe?

Is there a standard naming convention that is suggestible for columns in Pandas Dataframes ? As I looked around, this seems to be the most relevant question or

Line continuation for list comprehensions or generator expressions in python

How are you supposed to break up a very long list comprehension? [something_that_is_pretty_long for something_that_is_pretty_long in somethings_that_are_pretty

PEP guide for dictionary keys in python

Is there a PEP guide to follow as convention for dictionary key style? Particularly for using upper/lower case letters and multiple words(with space or undersco