Skip to content

Using a subclass of tqdm leads to improper nesting #509

@lauhayden

Description

@lauhayden
from tqdm import tqdm
from time import sleep

class tqdm2(tqdm):
    pass

for i in tqdm(range(10), desc='1'):
    for j in tqdm2(range(10), desc='2'):
        sleep(0.1)

Expected Behaviour

Nested progress bars as usual

Observed Behaviour

Broken nesting: the tqdm labled '2' seems to override the tqdm labled '1', such that '1' is not shown while '2' is running.

Versions

tqdm 4.19.5
python 3.6.3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions