About 56,900 results
Open links in new tab
  1. What is the naming convention in Python for variables and …

    PEP 8 is a guideline, not a law. It is an option on top of Python, not part of the official language. If everybody uses the same style, this would be preferred in a bigger company. All my Python …

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

    Apr 22, 2013 · Easier to ask for forgiveness than permission. This common Python coding style assumes the existence of valid keys or attributes and catches exceptions if the assumption …

  3. Python coding practice : Return None vs Return same datatype …

    Jan 29, 2013 · There is also another option not listed in the question: throwing an exception. It seems to be popular enough in python, and it's sometimes better to follow a common practice …

  4. class - Python Classes Best Practices - Stack Overflow

    "Best" practices are only "best" for a given value of "best" and a given value of "practices". Putting every wee bit into setters and getters leads to Java's getter-setter-hell (I feel any Java code is …

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

  6. Beginner Python Practice? - Stack Overflow

    Jul 10, 2010 · Welcome to CheckIO – a service that has united all levels of Python developers – from beginners up to the real experts! Here you can learn Python coding, try yourself in solving …

  7. Python PEP8: Blank lines convention - Stack Overflow

    I am interested in knowing what is the Python convention for newlines between the program parts? For example, consider this: import os def func1(): def func2(): What should be the ideal …

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

    Apr 28, 2015 · #!/usr/bin/env python # -*- coding: utf-8 -*- """Module documentation goes here and here and ... """ Why this is a good one: The first line is for *nix users. It will choose the Python …

  9. Python Coding style Wrapping Lines - Stack Overflow

    Sep 28, 2012 · The definitive reference for questions like these is PEP 8.PEP 8 gives you the freedom to break pretty much anywhere you want (provided you break after a binary operator …

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

    Dec 24, 2013 · According to the CIA's internal coding conventions (part of the WikiLeaks Vault 7 leak), python imports should be grouped into three groups: Standard library imports; Third …

Refresh