Skip to content

initial= parameter seems not working properly #215

@DeoLeung

Description

@DeoLeung
import tqdm
from time import sleep

to_mongo_pbar = tqdm.trange(100, desc='to Mongo', initial=30)
for i in tqdm.trange(100, desc='imputed', initial=30):
  sleep(0.1)
  # do something else for to_mongo_pbar
  to_mongo_pbar.update(1)
to_mongo_pbar.close()

for this snippet I would expect the iteration(i) start from 30 and finish at 99, however it extend the counter to 129
is it a bug or expected behaviour?

to Mongo: 130it [00:10,  9.83it/s]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions