This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients glangford, gvanrossum, mark.dickinson, tim.peters, vstinner
Date 2014-01-24.15:55:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwZVS1hG5Pt8a+AVto4tiPYiR-Fy48n6f56Rm2q3bWPYig@mail.gmail.com>
In-reply-to <1390577644.58.0.626127590885.issue20367@psf.upfronthosting.co.za>
Content
Hum, you should also modify the documentation to explicit the
behaviour. Example: "Duplicates futures are only yielded once".

You may add the same sentence in the asyncio.as_completed()
documentation. It looks like asyncio tests doesn't test as_completed()
with duplicated future. You may write a new patch to modify asyncio
doc and tests. It should be very similar.

+        completed = [f for f in futures.as_completed( [f1,f1] ) ]

You can just use list(futures.as_completed([f1,f1])). Please no space
around parenthesis (see the PEP 8).

+        self.assertEqual( len(completed), 1 )

No space around parenthesis (see the PEP 8):
self.assertEqual(len(completed), 1).

You may check the list value instead: self.assertEqual(completed, [f1])

(Why "f1" name? There is no f2, maybe rename to f?)
History
Date User Action Args
2014-01-24 15:55:05vstinnersetrecipients: + vstinner, gvanrossum, tim.peters, mark.dickinson, glangford
2014-01-24 15:55:05vstinnerlinkissue20367 messages
2014-01-24 15:55:04vstinnercreate