PDA

View Full Version : [SOLVED] Standard Python Practices?



njkt
March 12th, 2008, 06:50 AM
Hello,
I'm not a new programmer but I am new to python, I don't have any difficulty with python (so far), but my question is:

What are the common practices for coding in python? Is there a standard (foss community) way of formatting, general do's and don't with OOP and modules? Things of that nature, not sure how to phrase it but there it is :)

Thanks.

Wybiral
March 12th, 2008, 06:53 AM
Follow PEP 8 (http://www.python.org/dev/peps/pep-0008/) for your style and study the standard modules to see how good Python code should look.

njkt
March 12th, 2008, 06:56 AM
Thanks.

njkt
May 24th, 2008, 07:16 AM
To bring up an old post...

I am unable to visit python.org related websites for one reason or another (firewall issues), is there an archived version of these "pep" somewhere not hosted by python.org?

smartbei
May 24th, 2008, 09:33 AM
You could always use something like the google cache or archive.org.

njkt
May 24th, 2008, 10:08 AM
Google Archive doesn't work so well with this issue, using archive.org is good but i only get information from a year ago. I need an offline source because of low bandwidth, but this is good enough until i wind up back on dry land :)

thanks.

Lau_of_DK
May 24th, 2008, 10:28 AM
Google Archive doesn't work so well with this issue, using archive.org is good but i only get information from a year ago. I need an offline source because of low bandwidth, but this is good enough until i wind up back on dry land :)

thanks.

Looking at the standard modules was some good advice from Wyb. If you got what you came for, you can mark this Thread as Solved in the Thread Tools menu at the top of this screen.

/Lau

pmasiar
May 24th, 2008, 06:55 PM
I need an offline source because of low bandwidth, but this is good enough until i wind up back on dry land :)

Ah, so you are having fun hacking on Python while having fun traveling around the world? :-)

You can download docs: http://docs.python.org/download.html and either hack some code to fetch all pep pages from http://www.python.org/dev/peps/ , or checkout them via SVN: http://svn.python.org/projects/peps/trunk/

Have fun, and happy hacking! Consider also buing some O'Reilly's books, especially Python Cookbook.

LaRoza
May 24th, 2008, 07:24 PM
Have fun, and happy hacking! Consider also buing some O'Reilly's books, especially Python Cookbook.

Depending on your purpose, the pocket guides are also good.