waterbug at beeblebrox.gsfc.nasa.gov
Mon Dec 9 23:16:10 EST 2002
Andrew Bennetts wrote:
> On Mon, Dec 09, 2002 at 03:29:29PM -0500, Steve Waterbury wrote:
> > The only way I've come up with to pass in a value to
> > adbapi.Augmentation.operationDone(done) is as follows:
> > [ lambda folderol omitted ... ]
> What about:
> The idea of course is that you subclass operationDone to be whatever you
> want. You're also free to ignore it; it's a convenience function.
Ah, yes, I knew it would be something simple -- thanks Andrew
> I probably should update the "Introduction to Twisted Enterprise" doc to
> make this clearer :)
Actually, you might want to start with the doc string for
operationDone, which says:
"""Default callback for database operation success."""
I'd suggest something like:
"""Template for [or "example of"] callback indicating
operation success -- subclass as desired."""
I think I would have got the idea if it had said that.
(It isn't really what I would call a default because it isn't
called by default ... one has to explicitly call it, which,
as you point out, isn't the intent ... kind of a nit, but
enough to confuse a literalist such as myself ... ;^)
I try to adhere as closely as possible to what I think is
the design intent of the Twisted developers (since it tends to
make life easier in the long run ;^), so doc string hints about
subclassing, etc., are much appreciated -- as are the Twisted
docs, of course, which are continuously improving -- thanks!
> > BTW, thanks for all the new twisted stuff ... I'm just starting
> > to use lore ... very cool!
> Lore's quite new though, so if you've got any feedback Moshe and I would
> love to hear it.
Okay. I'm setting it up for our application docs, so I should
have some comments soon. (I had been using LyX, which is pretty
nice, but it's even nicer to have better integrated, all-Python
BTW, has anyone here checked out Leo? ... seems interesting
and might be integrable with lore ... so many documentation
technologies, so little time ...
More information about the Twisted-Python