[Chicago] How did you learn Python?

Carl Karsten carl at personnelware.com
Fri Mar 6 18:08:06 CET 2009

3 parts to learning 'anything'

1. learn enough to understand what everyone is talking about
2. to be somewhat functional
3. know everything

The Python syntax is really pretty simple.   There is a huge overlap in syntax 
with some other language you probably know (basic, C, Pascal, java, javascript, 
php, - what set am I describing?  procedural?)

(warning: bad idea coming next) If you want to make it really simple, strip away 
all the syntactic sugar (http://en.wikipedia.org/wiki/Syntactic_sugar) and just 
call the __magic__ methods:

Simple=fewer syntax elements to learn.  understanding c=a+1 and e=f[1] means you 
need to understand + and [] mean, as where a.__add__(b) and f.__getitem__(1) you 
only need to understand how to call a method and pass parameters, something you 
are going to need to know how to do anyway.  I am pretty sure the syntactic 
sugar notations makes Python easier to learn, but I also think it keep you from 
getting overwhelmed.  or something.

Last year I did a talk: "The Python that makes Python Python"  which I have 
renamed "Understanding Python."  including a constant struggle to keep track of 
my mouse (I was doing lots of cut/paste commands), starting over because people 
came in late, and interwoven Q&A, it took 2 hours.  I covered slicing, 
dictionaries, lamda, generators and I think I touched subclassing (if I did I 
didn't get into OPP principles.)  Personally, I believe what i covered is what 
you need to know to achieve #1.  2 hours.

Once you understand what people are talking about, then the learning process is 
fun and productive.  The tricky part about the python email module becomes 
knowing something about email, not how to work with a python dictionary.

I saved modules for last:  The standard Python distribution comes with a set of 
modules.  These modules you can rely on being available and maintained over 
time.  email, database, OS interaction, web stuff... the list is pretty 
impressive.  I don't see a point in sitting down and becoming proficient in all 
of them.  I wonder if there is anyone who would consider themselves proficient 
in all of them.  Even Guido.   I'll ask him at PyCon.

So don't spent too much time trying to figure out where to start. 
http://docs.python.org/tutorial/ and http://diveintopython.org are great.  Come 
to PyCon and take one of the intro tutorials.   whatever it is you pick, Just do it.

Carl K

More information about the Chicago mailing list