Should I write a book on Python Metaprogramming ?

andrew cooke andrew at acooke.org
Mon May 5 06:54:23 EDT 2003


Personally, I would be interested in something that covered the more
obscure / newer parts of Python.  I understand that you can generate
bytecode dyanmically, for example.  Also, what's the difference between
old + new style classes (including implementation)?  What do the various
special __ methods do etc.

I'd be less interested in general programming tricks (higher order
functions are not metaprogramming in my book, nor are they advanced if
you're used to functional programming languages).  Factories are hardly
rocket science, either (although modifying Python so that it could be used
in a prototype based manner would be a neat example of meta programming
(eg Self, Io)).  And I doubt how general you can be (can you really claim
you're writing a general book about OO metaprogramming and not mention
CLOS?  but it would be completely out of place in a Pythonish book...).

For example, I may need to write an extension to Python that allows people
to write/debug a script on one machine that then transparently lets them
manipulate objects on a remote machine (once the program is debugged the
library in use would have a switch flipped so that it used corba, say, to
provide the same interface remotely).  A book that helped me do that would
be great (and it seems like a good example of meta programming).

Not sure that's any help.  Just my two pesos,
Andrew

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





More information about the Python-list mailing list