Skip to content

[suggest] provide a simple version in v5 #610

@chengs

Description

@chengs

Since some critical errors are reported, which are all related to TMonitor, global thread, or global tqdm.__instances set.

Perhaps, it is better to provide a simple version (maybe tqdm.simple.tqdm and tqdm.simple.trange), without the intergration of the functions above. It will look like just a wrapper of an iterator.

class tqdmSimple():
    def __init___():
        self.iters = iters
        #only this, nothing else
        #no Tmonitor
        #no cls.__instances.

    def __iter__(self):
        for obj in self.iters:
            yield ....
            [print progress]

Indeed, it will not have some good features such as auto refresh, but it won't cause complicated errors). And then, tqdm with all features can be constructed on the basis of the simple version.

For instance, the simple_progress in the test cases.

Metadata

Metadata

Assignees

No one assigned

    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