Ticket #4538 enhancement closed fixed
Use False/True instead of 0/1 in twisted/internet/defer.py
| Reported by: | exarkun | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | |
| Cc: | Branch: | branches/booleans-in-defer-4538 | |
| Author: | exarkun | Launchpad Bug: |
Description
Booleans are great, I suppose. Clarity of intent, or something like that. Deferred.called, Deferred._suppressAlreadyCalled, DeferredList.fireOnOne{Callback,Errback}, DeferredLock.locked`... these aren't integers on which to perform arithmetic. They're flags indicating one of two possible states.
(There seems to be some desire to do this in the #411 branch; so to shorten the diff there, I'm moving those changes here.)
Change History
Note: See
TracTickets for help on using
tickets.
