Python

From Jonathan Gardner's Tech Wiki

Jump to: navigation, search

Python Website | Docs: 2.5

Contents

Why Python?

People who haven't seriously coded in Python don't appreciate Python.

I believe it takes one big project that is behind schedule coded in Python to really help people appreciate Python. When you're maxed out, and you just want to focus on getting something working, then Python is there to save you. It just works.

I also love Python because I don't have to think about Python when I write Python code. It's like how I love English because I don't have to think about English when I use it! Well, most of the time at least.

Python follows the rule of the Principle of Least Astonishment. It's one of the doctrines of the language. This means a lot of things are explicit where they are implicit in other languages. It also means that there isn't much magic.

Python in One Hour is a presentation that should take about 1 hour to work through. It has all of the basic language elements.

Magic

The most magical things in Python are (in order of magicality, high to low)

  1. Metaclasses.
  2. Descriptors.
  3. Comprehensions.

After that, there isn't much magic. These things baffle people because they come from 'bad' languages and their implicit assumptions are no longer valid.

Fedora Notes

Fedora ships with Python. These are the packages you need if you intend to do development on Python:

  • python
  • python-devel
  • python-docs: Puts the docs in /usr/share/doc/python-docs-<version>. Browse to /usr/share/doc/python-docs-<version>/html/index.html.

See Also