[Twisted-Python] My pet peeve ugly coding style
Moshe Zadka
m at moshez.org
Thu Jul 10 09:33:26 MDT 2003
On Thu, 10 Jul 2003, Tommi Virtanen <tv at twistedmatrix.com> wrote:
> On Thu, Jul 10, 2003 at 12:41:25PM -0000, Moshe Zadka wrote:
> > checkHosts(('moshez.org', 25), ('moshez.org', 22)
> > ).addCallback(util.println
> > ).addCallback(lambda _: reactor.stop())
>
> *vomit*
>
> d = checkHosts(('moshez.org', 25), ('moshez.org', 22))
> d.addCallback(util.println)
> d.addCallback(lambda _: reactor.stop())
>
> anyone?
No.
The above is the common, and correct, coding style.
It is the very reason .addCallback returns self.
--
Moshe Zadka -- http://moshez.org/
Buffy: I don't like you hanging out with someone that... short.
Riley: Yeah, a lot of young people nowadays are experimenting with shortness.
Agile Programming Language -- http://www.python.org/
More information about the Twisted-Python
mailing list