PEP 318 - PyFIT comments

John Roth newsgroups at jhrothjr.com
Wed Aug 4 12:46:51 EDT 2004


Decorator syntax seems to have been checked into 2.4b2.
I'm not going to comment on the syntax other than to say
that, when there isn't a real obvious syntax, someone has
to make a decision, and this one should work.

I was originally against it, on the basis that the only
use cases I saw were the elimination of the staticmethod()
and classmethod() builtin functions. I've used them, and
they're not ideal, but something like decorators for that
one use case seems to be going after a fly with a
howitzer.

Andrew Kuchling's comments here:
http://www.amk.ca/diary/archives/cat_python.html#003255
and especially the comments he quotes from Jim Hugunin
got me to thinking again about it. I can't quite see what
Thomas Heller is getting at with ctypes, though.

My current interest is in PyFIT. It's a Python
port of Ward Cunningham's FIT acceptance
testing program (fit.c2.com). I had to add a general
metadata mechanism to it to make it work cleanly
(the original port by Simon Michael tried to use
RExec, which obviously no longer works as well
as having major ambiguity problems.) There's an
early release in the download section at

http://www.xprogramming.com/software.htm

The current releases are in the files section of the
Extremeprogramming and the Fitnesse Yahoo mailing
lists.

When I looked at the metadata problem, I really
wanted a mechanism that would allow me to attach
metadata to any object in the class object. I can
do that to function objects, but I also need to do
it to properties and more general objects (such
as strings and integers.)

This doesn't, unfortunately, allow me to do that.

John Roth





More information about the Python-list mailing list