[python-advocacy] easy as py

Tal Einat taleinat at gmail.com
Fri Jul 20 19:48:29 CEST 2007


On 7/20/07, Mike Pittaro <mikeyp at snaplogic.org> wrote:
> Carl Karsten wrote:
> > One thing that I think would help people 'ease into Python' is the fact that
> > python without the batteries (modules) is only like 25 commands and functions.
> > and 1/2 of those aren't even needed 'at first.'  I'm guessing you can hit the
> > RoI level most people want by looking over about 10 python keywords and some
> > list/dict notation.  you don't even need to execute it, just see it, read it,
> > understand it.
> >
> > I am thinking we need about 10 - 20 little snippits like this:
> >
> >  >>> for x in [1,7,'abc',4]: print x,
> > 1 7 abc 4
> >
> > The above has some important features I find subtle, like the fact that to
> > traverse a list, you don't need to A) determine the length, B) use that length
> > as the upper limit of a for loop, C) use the loop counter as an index into the
> > list.  granted other languages have FOR EACH which is similar, python seems to
> > ... um... use lists more intelligently?   (hmm... I have a concept in my head,
> > but I am having trouble putting it to words.  may not be important, cuz readers
> > of this list probably know what I am talking about.)  Python makes very
> > efficient use of a small command set.
> >
> > So I would like to collect a "one page" set of snippits.  guessing a wiki page
> > would be good for this.
>
> >
> Along these lines, I dealt with a similar problem in the past, converting people to different 'dialects' of SQL.
> The method that seemed to be most successful was a side by side 'cheat sheet' mapping of commands in the different dialects.
>
> If we collected a set of snippets, demonstrating simple and common operations in a few languages along side of  Python snippets, it might help people that already know another language.
>
> Of course, we have to make those examples realistic, and not create (too much of) a debate over which language implements the idiom better :-)
>

Something somewhat similar, perhaps a good place for some initial examples:
http://pleac.sourceforge.net/


More information about the Advocacy mailing list