David Goodger hosts his PyCon 2007 handout "Code Like a Pythonista: Idiomatic Python" and related Python material.
HN commenters call terse resources like his idiomatic Python handout the best learning material, a goldmine and a good complement to Python tutorials.
For python vs ruby:
Why Python over ruby: http://news.ycombinator.com/item?id=682101
Django vs Ruby on Rails: http://news.ycombinator.com/item?id=195423
Python vs ruby in depth: http://news.ycombinator.com/item?id=741257
I use Python, Some resources for learning Python in no particular order:
The Official Python Tutorial - docs.python.org/tutorial/
"Dive Into Python", by Mark Pilgrim - http://diveintopython.org/toc/index.html
"A Byte of Python" - swaroopch.com/notes/Python
Google's Intro to Python Class (online) - http://code.google.com/edu/languages/google-python-class/
"The New Boston" Programming Python Tutorials - http://youtube.com/user/thenewboston#g/c/EA1FEF17E1E5C0DA
"Building Skills in Python", by Steven F. Lott - http://homepage.mac.com/s_lott/books/python/html/index.html
"Think Python: How to Think Like a Computer Scientist" - http://greenteapress.com/thinkpython/thinkpython.html
"Code Like a Pythonista: Idiomatic Python" - http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
OpenCourseWare: MIT 6.00 Introduction to Computer Science and Programming - http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/video-lectures
"Learn Python the Hard Way" by Zed Shaw - http://learnpythonthehardway.com
Practice Questions at PySchools - http://pyschools.com
Begin Python - http://beginpython.com
More Tutorials - http://awaretek.com/tutorials.html
source:…
A formidable effort.
It might be matter of taste but recommendations given starting from "Understanding the packages" and to "Install packages that need compiling" are almost harmful.
My preference:
* you should not care what is your `sys.path` looks like. You need it for debugging if something goes horribly wrong. A tutorial might mention it but things like `sys.path.insert(0,..)` should be avoided or accompanied with a big disclaimer (don't use nuclear weapons if you care about the future)
* the same goes for `PYTHONPATH`. It is a hack that rarely
needed
* don't use `sudo pip`. System packages should be managed by a system packager. Use `pip --user` or create a `virtualenv`
* `pip` can handle tarballs there is no need for `python setup.py install` in this case.
"Code Like a Pythonista: Idiomatic Python" is worth mentioning
http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
Some third-party packages that could be listed (it is subjective):
bpython - interactive prompt; something for tests e.g., pytest, tox, selenium; sphinx - docs; lxml - xml/html, werkzeug - if you talking about web-development; SQLAlchemy - sql; Cython - C extension, ~ Python syntax; async. libs e.g., gevent, Twisted.
Try python - it would blow your mind.
For 7 years, I too was a PHP believer for its simplicity. It was my favorite language by far.
1.2 year ago, I started to use python and was hesitant with it at first. As I worked more and more in python, I simply fell in love it. It does lot of greats things that PHP does (dynamic arrays, dictionaries, and functional programming) and adds lot more functionality that PHP is missing.
1. How would you add a new element to an array?
PHP: array[] = 2
Python: array += [2]
2. How to combine 2 arrays?
PHP: ?? array_merge(...) ??
Python: array += array <- it is as simple as appending to a string.
Lot more fun examples: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#swap-values
> its still my contention that the best method by which to learn any language is the "There ain't nothin' to it but to do it" method.
This is really good method, but doing it alone may not teach you the correct paradigms of the language. You can write FORTRAN in any language, but you probably shouldn't.
If I were about to learn Python by just converting some PHP fragments, I would surely miss those characteristics that seperate Python from PHP. However, by reading other people's code or reading some documents on idiomatic Python (e.g. [1]), my understanding would be much better.
[1] - http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
Mr Kennedy -- this is an interesting course synopsis, it looks like you've put a lot of good work into it. The course itself is not public access, but the materials are.
> The few features that are Python 3 specific will be highlighted as such (e.g. new dictionary merging syntax).
The print statement=>function is a pretty big one too. IMO it's not too much of a wart to import it from the future in order to straddle 2.x/3.x.
Anyone else who came hoping to read actual content on how to write more Pythonic code should consult this popular reference from Pycon '07 [1].
[1] http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
In case other Python enthusiasts are seeking additional resources (besides reading PEP 8) Bhadra and others on stack overflow suggest:
Code Like a Pythonista: Idiomatic Python (http://python.net/~goodger/projects/pycon/2007/idiomatic/)
Common mistakes and Warts (http://learnpython.pbwiki.com/PythonTricks)
How not to write Python code (http://eikke.com/how-not-to-write-python-code/)
Python gotcha (http://eikke.com/python-gotcha/)
Here's the stack overflow thread I was looking at:
http://stackoverflow.com/questions/356161/python-coding-standards-best-practices