About 71,300 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. Importing modules in Python - best practice - Stack Overflow

    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. 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 …

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

    Mar 20, 2013 · Global variables and coding style recommendations Asked 12 years, 8 months ago Modified 12 years, 8 months ago Viewed 44k times

  5. 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 …

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

    Oct 6, 2009 · Per PEP 8, __version__ needs to be directly following the main docstring, with a blank line before and after. Also, it is best practice to define your charset immediately under the shebang - # -*- …

  7. coding style - What's the correct way to sort Python `import x` and ...

    Dec 24, 2013 · After all, Python is all about readability. Also, it is easier to verify that something is imported, and avoids duplicate imports. There is nothing available in PEP 8 regarding sorting. So it's …

  8. Is while (true) with break bad programming practice?

    Apr 10, 2016 · Is while (true) with break bad programming practice? Asked 16 years, 11 months ago Modified 1 year, 9 months ago Viewed 125k times

  9. In python, why use logging instead of print? - Stack Overflow

    For simple debugging in a complex project is there a reason to use the python logger instead of print? What about other use-cases? Is there an accepted best use-case for each (especially when you're …

  10. Best online resource to learn Python? - Stack Overflow

    Mar 8, 2012 · Google's Python Class Welcome to Google's Python Class -- this is a free class for people with a little bit of programming experience who want to learn Python. The class includes written …