Am 17.02.2014 um 23:58 schrieb Dustin J. Mitchell :
> Async programming aside, this mode of chaining multiple methods
> doesn't sit well with me:
>
> def A()
> # .. do stuff
> B()
>
> def B()
> # .. do stuff
> C()
>
> I think it'd be more idiomatic to have a controlling method that
> indic
On Tue, Feb 18, 2014 at 10:11 AM, Axel Rau wrote:
> Thanks, but the calls in C depend on the data (program branches).
> There are 8 different call parameter sets dependent on contexts.
I still believe that making those dependencies visible is a good idea.
At any rate, in your original code:
On Tue, Feb 18, 2014 at 4:21 PM, Dustin J. Mitchell wrote:
> D is returning a Deferred, but you're not doing anything with it. In
> fact, all of A..E are returning Deferreds and you're ignoring them.
> In an inlineCallbacks-decorated method, you need to yield every
> Deferred you receive.
>
I re
True, I only mean that
def A(self):
...
tmp = yield subprocess(args)
...
self.B()
leaves the deferred from B totally unhandled, which is nearly always a
bad thing.
Dustin
___
Twisted-Python mailing list
Twisted-Pyth
Am 18.02.2014 um 16:34 schrieb Dustin J. Mitchell :
> True, I only mean that
>
>def A(self):
>...
>tmp = yield subprocess(args)
>...
>self.B()
>
> leaves the deferred from B totally unhandled, which is nearly always a
> bad thing.
Is this true, if I have a yi
That handles the Deferred from subprocess(args), but it doesn't handle
the Deferred from self.C()
On Tue, Feb 18, 2014 at 11:40 AM, Axel Rau wrote:
>
> Am 18.02.2014 um 16:34 schrieb Dustin J. Mitchell :
>
>> True, I only mean that
>>
>>def A(self):
>>...
>>tmp = yield subproc
Am 18.02.2014 um 17:45 schrieb Dustin J. Mitchell :
> That handles the Deferred from subprocess(args), but it doesn't handle
> the Deferred from self.C()
And that calls three times self.D, which has a yield.
What is wrong with my reasoning?
Something prevents the inline callback in self.D to wait
On Feb 15, 2014, at 5:32 PM, exar...@twistedmatrix.com wrote:
> On 15 Feb, 07:58 pm, gl...@twistedmatrix.com wrote:
>>
>> The one thing that confused me was that the sample program appeared to be
>> running the program only once a second, and waiting for it to complete
>> before running it aga
I'm suggesting that there are lots more problems with your code than
the one you have identified. Any method which is decorated with
@defer.inlineCallbacks will return a Deferred, and you need to handle
every Deferred somehow. Generally (although not always, as lvh has
said) you do that by yieldi
On Feb 15, 2014, at 5:32 PM, exar...@twistedmatrix.com wrote:
> On 15 Feb, 07:58 pm, gl...@twistedmatrix.com wrote:
>>
>> The one thing that confused me was that the sample program appeared to be
>> running the program only once a second, and waiting for it to complete
>> before running it aga
Am 18.02.2014 um 20:03 schrieb Dustin J. Mitchell :
> I'm suggesting that there are lots more problems with your code than
> the one you have identified. Any method which is decorated with
Sure. This is my 1st project with twisted. (-;
> @defer.inlineCallbacks will return a Deferred,
This is th
On Tue, Feb 18, 2014 at 4:58 PM, Axel Rau wrote:
> I see log message ‚imageMap ended‘ , but not 'In navigation.'
> Any further advice?
I'm guessing that you omitted @inlineCallbacks for navigation, but
that it contains a yield. In Python, that makes it a plain old
generator expression, which ju
On 18 Feb, 07:29 pm, gl...@twistedmatrix.com wrote:
On Feb 15, 2014, at 5:32 PM, exar...@twistedmatrix.com wrote:
On 15 Feb, 07:58 pm, gl...@twistedmatrix.com wrote:
The one thing that confused me was that the sample program appeared
to be running the program only once a second, and waiting
On Feb 18, 2014, at 6:07 PM, exar...@twistedmatrix.com wrote:
> On 18 Feb, 07:29 pm, gl...@twistedmatrix.com wrote:
>>
>> On Feb 15, 2014, at 5:32 PM, exar...@twistedmatrix.com wrote:
>>> On 15 Feb, 07:58 pm, gl...@twistedmatrix.com wrote:
The one thing that confused me was that the s
On 02:50 am, gl...@twistedmatrix.com wrote:
On Feb 18, 2014, at 6:07 PM, exar...@twistedmatrix.com wrote:
On 18 Feb, 07:29 pm, gl...@twistedmatrix.com wrote:
On Feb 15, 2014, at 5:32 PM, exar...@twistedmatrix.com wrote:
On 15 Feb, 07:58 pm, gl...@twistedmatrix.com wrote:
The one thing that
15 matches
Mail list logo