[issue24523] coroutine asyncio.wait() does not preserve order of elements

2015-11-29 Thread Марк Коренберг

Марк Коренберг added the comment:

Yes this is not a bug.

Use asyncio.gather(), it preserves order of elements :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24523] coroutine asyncio.wait() does not preserve order of elements

2015-06-28 Thread Марк Коренберг

New submission from Марк Коренберг:

If I pass an list of futures/coroutines as (done, _) = asyncio.wait([...]), 
order of elements in `done` does NOT match order of elements in `wait`'s 
argument. This is not documented, and I don't know if that is a bug or not.

Also, documentation say:

Wait for the Futures and coroutine objects given by the SEQUENCE futures to 
complete.

Really, this should be SET, since order is not preserved. Or, sources should be 
patched to preserve the order. I think, it is not hard to preserve order [in 
asyncio code].


P.S.

For example, in Tornado, it is guaranteed (and documented) that order is 
preserved, so I can write

[res1, res2] = yield [fut1(), fut2()]

and it is guaranteed, that res1 - is a result of fut1()

--
components: asyncio
messages: 245899
nosy: gvanrossum, haypo, mmarkk, yselivanov
priority: normal
severity: normal
status: open
title: coroutine asyncio.wait() does not preserve order of elements
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24523
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24523] coroutine asyncio.wait() does not preserve order of elements

2015-06-28 Thread Guido van Rossum

Guido van Rossum added the comment:

The docs say that it returns two *sets* and Python's set datatype is unordered. 
So that's all you need to know. I don't think there's anything else needed in 
the docs.

--
resolution:  - not a bug
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24523
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com