About 51 results
Open links in new tab
  1. What is the naming convention in Python for variables and functions ...

    The coding style is usually part of an organization's internal policy/convention standards, but I think in general, the all_lower_case_underscore_separator style (also called snake_case) is most common …

  2. coding style - Importing modules in Python - best practice - Stack …

    I am new to Python as I want to expand skills that I learned using R. In R I tend to load a bunch of libraries, sometimes resulting in function name conflicts. What is best practice in Python. I h...

  3. coding style - How many lines of code should a function/procedure ...

    As Steve Mcconnell and Bob Martin say (two pretty good references on coding best practices), a method should do one thing and only one thing. However many lines of code it takes to do that one thing is …

  4. What is the common header format of Python files?

    Oct 6, 2009 · Problem In Python 2.1, Unicode literals can only be written using the Latin-1 based encoding "unicode-escape". This makes the programming environment rather unfriendly to Python …

  5. python - Global variables and coding style recommendations - Stack …

    Mar 20, 2013 · This question is quite general but it's more for me to understand good coding practices in python... I'd like to define a constant that I can use inside in any function without having to pass it as

  6. Is it a bad practice to use break in a for loop? - Stack Overflow

    Is this a bad practice? I have seen the alternative used: define a variable vFound and set it to true when the value is found and check vFound in the for statement condition. But is it necessary to create a …

  7. Is it a good practice to use try-except-else in Python?

    Apr 22, 2013 · This common Python coding style assumes the existence of valid keys or attributes and catches exceptions if the assumption proves false. This clean and fast style is characterized by the …

  8. coding style - What does it means to not exceeding 80 characters in a ...

    Jan 2, 2016 · There is a mention that it is preferable for that a line in a Python script should not exceed more than 80 characters. For example: print("A very long strings") Does it include the characters of the

  9. python - Why are global variables evil? - Stack Overflow

    Oct 3, 2013 · Why is the global keyword considered bad practice in Python (and programming in general)? Links with more information would also be appreciated.

  10. python - Is nested function a good approach when required by only …

    Jan 29, 2011 · 5 It's just a principle about exposure APIs. Using python, It's a good idea to avoid exposure API in outer space (module or class), function is a good encapsulation place. It could be a …