Skip to content

Add a general constructor with default values for all arguments #52

@Cyrilvallez

Description

@Cyrilvallez

Hi !

I like this package as I'm a huge fan of tqdm in Python. However, I find it very strange that you did not add a default constructor requiring an iterable, and providing default values for all arguments. Something like

ProgressBar(wrapped::Any;  arg1=foo, arg2=foo,...)

for all fields of ProgressBar. Indeed, the only outer constructor provided is not sufficient. For example, I wanted to set the description of a bar such as

ProgressBar(1:100, description="foo")

but the current state of the constructors will not allow me this simple syntax. In the current state, one would need to create a new ProgressBar (or redefine a constructor somewhere) by setting all fields just to put the description, which is absolutely not convenient.

If you want, I could quickly add the change in the source code and add a pull request.

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