You would use this when you have a pool of jobs to process in a specific order. Tasks should be performed only once, but after it can be added again:
jobs = set([job1, job2, job3])
while jobs:
job = jobs.pop()
job.process()
job.process() . , .
, , . DependencyFinder.find() distlib ( pip, ), todo , .
dict.popitem(), :
popitem() , .
, set, None .
source
share