Skip to content

Commit

Permalink
make first argument of function lorem.ipsum optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-develop committed Oct 9, 2024
1 parent 885f32f commit 861538a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ gcd.
* Any value can now be passed as `assert` error message (and will be converted
to str)
* `$` and the following identifier can now be spaced (`$ id` is now valid)
* `paraghraphs` argument of function `lorem.ipsum` is now optional and defaults
to 1

### Fixed
* Fixed a crash in `math.log` on base=1
Expand Down
2 changes: 1 addition & 1 deletion lib_/lorem.noug
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Lorem: a lorem ipsum library
import random

def ipsum(paragraphs)
def ipsum()(paragraphs=1)
assert is_int(paragraphs), "first argument of function 'lorem.ipsum' SHOULD be an integer."
assert paragraphs >= 0, "first argument of function 'lorem.ipsum' SHOULD be positive."
if paragraphs == 0 then return ""
Expand Down

0 comments on commit 861538a

Please sign in to comment.