We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c684d8 commit 19f06afCopy full SHA for 19f06af
cyaron/string.py
@@ -101,10 +101,9 @@ def random_paragraph(sentence_count_range, **kwargs):
101
@staticmethod
102
def random_regular(*args, **kwargs):
103
pattern = args
104
- limit_len = kwargs.get("limit", NUMBERS)
105
- if limit_len is None or limit_len == 0:
106
- limit_len = 10
107
- if(list_like(args)):
+ limit_len = int(kwargs.get("limit", default="10"))
+ if (limit_len <= 1): limit_len = 10
+ if (list_like(args)):
108
pattern = random.choice(args)
109
_x = xeger.Xeger(limit=limit_len)
110
- return _x.xeger(pattern)
+ return _x.xeger(pattern)
0 commit comments