Skip to content

Commit

Permalink
clarify that showvalues "name" can be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Jul 27, 2024
1 parent 45e21fb commit 721da1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ p = Progress(n)
for iter in 1:10
x *= 2
sleep(0.5)
next!(p; showvalues = [(:iter,iter), (:x,x)])
next!(p; showvalues = [("iteration count",iter), ("x",x)])
end
```

Expand All @@ -292,7 +292,7 @@ you can alternatively pass a zero-argument function as a callback to the `showva
```julia
x,n = 1,10
p = Progress(n)
generate_showvalues(iter, x) = () -> [(:iter,iter), (:x,x)]
generate_showvalues(iter, x) = () -> [("iteration count",iter), ("x",x)]
for iter in 1:10
x *= 2
sleep(0.5)
Expand Down

0 comments on commit 721da1a

Please sign in to comment.