[Twisted-Python] reactor.callLater(0,) should not be an idiom [PATCH]
glyph at twistedmatrix.com
Tue Oct 15 18:46:18 EDT 2002
On Tue, 15 Oct 2002 07:10:23 -0500, Moshe Zadka <twisted at moshez.org> wrote:
> This patch touches many places, so I wanted to run it by the list
Why should this not be an idiom?
Neither utils.schedule(...) nor callLater(0,...) is particularly obviously
named unless you read the docstring, and utils.schedule adds a bunch of
getattr/python function call stuff to the cases where it's used for apparently
no reason. Not to mention the fact that it provides a new way to write Twisted
code that is not backwards compatible with older versions of Twisted. This
also does not add any functionality.
So, let's review, in order of importance. This patch:
* fixed no bugs
* added no features
* touched a lot of code
* destabilized a core Twisted API (in a fowards-compatible but not
backwards-compatible way) in that it implies callLater(0...) is
* made a very basic and frequently-used idiom slightly less efficient
Most of all, it provides two ways of doing the exact same thing, and I
generally think that the TIMTOWTDI philosophy is awful.
| <`'> | Glyph Lefkowitz: Travelling Sorcerer |
| < _/ > | Lead Developer, the Twisted project |
| < ___/ > | http://www.twistedmatrix.com |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021015/996d8f83/attachment.pgp
More information about the Twisted-Python