Opened 13 years ago

Last modified 11 years ago

#410 enhancement closed invalid (invalid)

Deferred.callback(anotherDeferred)

Reported by: etrepum Owned by:
Priority: low Milestone:
Component: Keywords: core
Cc: glyph, radix, exarkun, itamarst, etrepum Branch:
Author:

Description


Change History (4)

comment:1 Changed 13 years ago by etrepum

This was discussed on #tmlabs today.  The current (as of today) behavior is to assert that the user 
doesn't do this, and force them to use maybeDeferred or Deferred.chain themselves.

Is this really necessary?  I think that implicit handling of this would work fine most of the time.  
Here's a trivial example of how to behave badly:

    from twisted.internet.defer import succeed
    def print_(v): print v
    succeed(succeed(1)).addCallback(print_)

comment:2 Changed 11 years ago by exarkun

The general concensus is that this is almost always an error on the programmer's
part.  Making it raise an exception saves more time than it costs.

Does anyone else disagree?

comment:3 Changed 11 years ago by glyph

I guess not.

comment:4 Changed 6 years ago by <automation>

  • Owner glyph deleted
Note: See TracTickets for help on using tickets.