Skip to content

make use of __iadd__ #6

@Midnighter

Description

@Midnighter

I sometimes do something like this:

bar = ProgressBar().start()
for _ in container:
    bar.update(bar.currval + 1)
    # ...
bar.finish()

It'd be neat if instead I could simply do:

bar += 1

If there's interest in this, I can submit a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions