Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Cyrilvallez opened this issue Dec 18, 2022 · 0 comments
Open

Comments

@Cyrilvallez
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant