Python in a Nutshell for Python 2.4

Alex Martelli aleaxit at yahoo.com
Thu Sep 23 17:24:16 EDT 2004


Josh Close <narshe at gmail.com> wrote:
   ...
> Is there any particular reason you left out certain things in the
> Nutshell book? Like os.fork and syslog, and a few others I can't think
> of off the top of my head? Maybe because they work the same as the C
> version or something, or there is man pages about it?

The hardest part of writing the Nutshell was to decide what to include,
or more precisely, what NOT to include, to make it as useful as possible
within the 600-pages limit (I broke that limit, a bit, but not by much;
it's 635 pages all told, I believe).  It would have been much easier to
just cover every bit in the standard library, avoid useful stuff that's
not in the standard library (Numeric, Tkinter, mxDateTime, etc etc), and
basically parrot the standard library docs.  I believe (judging,
basically, by the reviews I got) that by selectively covering only "the
most useful parts" (in my own very personal judgment...) of the standard
library, I managed to make the book more useful to most readers than it
would have been had I taken the easier route.  The exhaustive online
docs _are_ there, after all, when you need to make sure you can see the
docs about _every_thing, without Alex's judgment getting in the way; the
Nutshell hopefully covers the parts most readers need most often.

The fact that some parts of the Python standard library only work under
some platforms, but not others, is something I gave high priority to, in
deciding what to cover and what not.  I think page xi is quite up-front
about it: "This book ... focuses on Python's cross-platform
capabilities".  I do cover _some_ platform-specific aspects, such as
"richer text I/O" (readline, Gonnerman's Alternative Readline, curses,
Gonnerman's WConio, Lundh's Console -- sometimes with just very brief
mentions...), because my experience suggests that such functionality IS
highly sought after by the kind of readers who may often be not
experienced enough to have an easy time finding out the info otherwise.
But mostly, the Nutshell is focused on cross-platform, not platform
specific stuff.

 
> Just curious why, and if they'll be in the next version or not. 

I will review every decision I've made, and, should there be an outcry
in favour of platform-specific coverage (so far, I haven't heard many
complaints about the cross-platform focus), I may have to reconsider --
dropping something else (deciding _what_ to drop will be sheer agony...)
to make space for syslog, linuxaudiodev, _winreg, EasyDialogs, whatever.

I think there should be separate books about platform-specific Python
(so far, there's one -- alas getting rather old -- about Windows, but
none about the Mac, Linux, or other Unixen), since just focusing on the
cross-platform potential of Python fills a decent-sized book to the
point it's bursting at the seams (I'm not interested in 1000+ pages
books, and neither is O'Reilly for its Nutshell series).  Whether
publishers, and the book-buyers' market, agree with me, is of course
another issue (a proposal for a platform-specific book about Python for
the Mac got rejected -- by the major publisher of Python books AND of
Mac books, they should have a good feeling for these markets -- as aimed
to "a niche within a niche", alas).


Alex



More information about the Python-list mailing list