Skip to content

Commit cbf907c

Browse files
author
Sylvain MARIE
committed
Updated the repr aspects of usage page
1 parent f4040ca commit cbf907c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/usage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,12 @@ expr = Get({'a': 1}, s) # OK
175175
expr = 'hello'[0:i] # fails
176176
expr = Get('hello', Slice(0, i)) # OK
177177
# representing: Repr/Str/Bytes/Sizeof/Hash
178+
# -- by default repr show the to_string()
179+
assert repr(l) == '<_LambdaExpression: l>'
180+
# -- but you can disable it
181+
l.repr_on = False
178182
expr = repr(l) # fails
183+
# -- in both cases, if you need repr in the expression, use
179184
expr = Repr(l) # OK
180185
# formatting with the variable in the args
181186
expr = '{} {}'.format(s, s) # fails

0 commit comments

Comments
 (0)