[Chicago] How did you learn Python?

James Snyder jbsnyder at fanplastic.org
Mon Mar 9 18:06:41 CET 2009

On Mar 6, 2009, at 6:35 PM, kirby urner wrote:

> On Fri, Mar 6, 2009 at 10:50 AM, Garrett Smith <g at rrett.us.com> wrote:
> << SNIP >>
>> To really, really grow in Python, I suggest reading code written by
>> seasoned (10+ years experience) developers. The safest and  easiest  
>> bet,
>> I think, is read modules in the standard library. In my experience,
>> reading code written by leaders in a development community is, hands
>> down, the best way to get up to speed on not just the language, but  
>> the
>> Tao of its ecosystem.
> <visitor from="Portland" content="more babbling">
> I agree for the most part although your 10+ yrs experienced developer
> (me one of them) will often include refugees or passers by from
> another language (xBase in my case) and this will color their style,
> e.g. it's often fairly easy to recognize a "Java influenced" Python
> coder.

That's certainly true.  You can write procedural Python, or any number  
of other styles of Python code that's perfectly functional, but may  
not be the best example of ideal Python code.

This probably argues for looking at code examples from a variety of  

> Also, Guido has mentioned the Standard Library being ripe for a
> recasting in 3.x versions, was it grew up as sort of a hodge-podge
> from the get go, uneven in terms of code quality (a really good
> hodge-podge though, is "the batteries" in "batteries included" -- the
> downfall of many an elegant language is no hooks to "reality" whereas
> Python has always had plenty of real world glue, more every day).
> Over on edu-sig (a Python list), going back to the early beginnings,
> you'll find Tim Peters giving excellent pointers.  Python is one of
> those languages wherein its possible to display cleverness over and
> above what's really needed for the task (i.e. allows showing off) but
> the mark of a strong coder is she aims for above average but not out
> of the ballpark in terms of what others would be comfortable using
> (maintaining).

This is true as well.  Some of those "clever" aspects of writing  
things in python, like using list comprehensions or generators, do  
have benefits beyond just being powerful or compact forms of  
expression.  They can also help with performance.

What's nice about some of these things too is that you can get  
performance benefits from fairly elegant expressions.  This is not to  
say that there isn't such a thing as writing an ugly speed hack in  
Python, though :-)

> I'd say the next chapter after OO in my story (Spaghetti Code Wild
> West. Structured/Civilized, thinking in Objects....) is a combination
> of FOSS and XP (eXtreme Program), especially the part about partners,
> needing to make sense to at least one other person.  These lessons
> come from GNU/Linux world, where intense collaboration among strangers
> has been the name of the game.
>> From an HR point of view (human resources) we're interested in ending
> the "private castle" approach to coding, where one indispensable
> individual builds a "fortress of solitude" around code no one else can
> decipher.  That's a recipe for disaster and Python, in the hands of
> professionals, doesn't easily "black hole" in that way (just stay away
> from gratuitous use of metaclasses and you'll be fine (smile)).
> A language like J (an APL spin off) or even Perl, might out of the box
> tempt a newbie into a solo coding style, but within strong IT cultures
> that promote XP and/or related practices, such "implosion" is
> generally avoided, using the very tools developed for FOSS in the
> first place e.g. Launchpad etc.
> Indeed, the best FOSS projects, such as Python itself, Django, Pocoo,
> wxPython... Numpy are so successful precisely because the code is
> amenable to "handing on" i.e. doesn't bottleneck in the mind of some
> "genius" (so thank you Tim Peters, for encoding the Zen of Python when
> it mattered -- helped keep us on track).

This will be interesting to watch over the coming years.  Languages  
themselves set an example for how a programmer should use them.  I  
think this, in part, shows up in the syntax and whatever standard  
library of functionality comes with the language.  When thinking about  
this the flat namespace in PHP certainly comes to mind (maybe they've  
improved things on that front). Also, one can certainly argue that in  
the hands of a professional programmer one can write decent  
maintainable code in Perl, but there's certainly "more than one way to  
do it" and I'd hazard a guess that for less experienced programmers  
it's easier to write unreadable and unmaintainable software in Perl  
than it is in Python (regardless of intent :-) ).

> Kirby
> </visitor>
>>> James Snyder wrote:
>>>> This discussion makes me curious about something though...
>>>> 1. How many people here started as self-taught Pythonistas vs.
>>>> learning it from some sort of course/workshop/guided instruction?
>>>> 2. Regardless of how you got started, have you taken some
>>>> instruction?  Was it useful/helpful?
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> http://mail.python.org/mailman/listinfo/chicago
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago

James Snyder
Biomedical Engineering
Northwestern University
jbsnyder at fanplastic.org
ph: (847) 644-2322

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/chicago/attachments/20090309/adb0203f/attachment.pgp>

More information about the Chicago mailing list