• Last edited on Jun 5, 2015, 11:42:43 AM by 1241495 IntrepidBrit

Mandatory reading

StackOverflow’s Official “How to ask a good question” Page

Further remarks

Although the Stack Overflow official help is useful, there are a few things to expand on:

  • Your question should follow the flow of: Problem -> Reasoning -> What you’ve tried. Sometimes, a problem can be resolved simply by changing how your code fits into a program/framework. By specifying the reasoning behind what you’re trying (and the problem), we can potentially direct you to the “proper” channel to resolving your issue.
  • If your code samples and/or program outputs are particularly lengthy, you may want to use a code pasting site (like http://pastebin.com/) to make your question more readable. Just make sure you don’t set your pastebin to self destruct. After all, we want to be able to help people on Stack Overflow for years to come!
  • Format your question! Stack Overflow uses Markdown, so you should familiarise yourself with Markdown and how it’s used across the site.

We also have a number of Python-specific recommendations:

  • Ensure you let us know if you’re using Python 2.x or 3.x (or both!)
  • If you are using any libraries not included in the basic Python install, which libraries you’re using. For example:
    • numpy
    • matplotlib
    • scipy
    • pandas
  • What web frameworks you’re using (including, but not limited to):
    • Django
    • Twisted
    • Flask
    • If you don’t know, then you probably aren’t using one!
  • What runtime you’re using. For example:
    • CPython (if you don’t know, then it’s probably this one)
    • Pypy
    • Jython
    • Folk will generally assume that you’re running CPython on Unix unless you specify otherwise!
  • What operating system(s) you’re using. Your Python mileage may vary depending on what platform you’re on.

If you have any further questions, or want input on your question - feel free to ask in the Python chat room!