Should I write a book on Python Metaprogramming ?

andrew cooke andrew at acooke.org
Tue May 6 08:02:57 EDT 2003


well i hope the following isn't terribly pointy-hatted elitist, but if you
tried to think in more general terms when programming - if you looked to
other languages for help and inspriration - then you might write better
python programs.

in my experience it saves time, in the long run, to broaden your horizons.
 python is a very flexible language and it borrows ideas from many places.
 there's always (even in python) many ways to solve a problem.  if you
stay "within the box" then you'll never see alternative solutions that
could be useful.

"only one way to do it" applies (imho) only at the level of basic syntax. 
i doubt any two people will produce the same high-level program structure
to solve complex problems.

there is, of course, always a tension between what you want to do and what
the language lets you do.  if this wasn't true then programming in every
language would be the same and there would be no point in looking
elsewhere.  by the same token, not every idea can be re-used.  but the
process of exploring what is relevant often helps reveal the essence of
the idea.  once you understand the essential idea, expressing it in the
language you are using is usually obvious.  sometimes you arrive back to
an approach you already knew, but see it in a new light; other times you
understand more deeply why an alternative approach is more pythonic;
sometimes you hit on something new and useful.  you always gain something.

andrew


Bryan said:

> my thoughts exactly.  i don't have the time or the desire to learn a
> concept
> in a language i'm not familiar with, then "port" it in the most pythonic
> way.  if this book is python centric, i'll definitely buy it.  it's a
> topic
> i would like to learn more about.
>
> bryan
>
> "Van Gale" <news at exultants.org> wrote in message
> news:pkrta.535$%s.89505855 at newssvr14.news.prodigy.com...
>> I personally find it much easier to understand concepts when I see
>> concrete examples in a language in which I'm able to think.  I also have
>> too much stuff on my plate to be able to spend time just learning
>> theory.  I want to know how to apply theory to code I'm going to be
>> writing.  Said another way, if I can digest the theory from a language I
>> know well, there's a good chance I'll be able to use it in code I write
>> later :)
>>
>> I think Bruce Eckel is one of the best authors around today, yet when I
>> saw that Thinking in Patterns is now almost entirely in Java I was
>> *really* unhappy and I won't buy that book.  I'm sure it's the right
>> thing for him to do, but trying to digest Java snippets into Python
>> snippets will make understanding too difficult for me.  (If I'm ever
>> forced into a Java job of course, it'll be an early purchase :)
>>
>> So, from looking at your outline I'd definitely buy it if it was
>> dedicated Python.  Otherwise I'd scan the Python sections at the store
>> and only buy it if something catches my eye as useful or interesting to
>> buy it.
>>
>> Van
>>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>


-- 
http://www.acooke.org/andrew





More information about the Python-list mailing list