Skip to content
Snippets Groups Projects

Draft: Resolve "Short circuiting and lazy evaluation"

Open Ivan Kondov requested to merge 49-short-circuiting-and-lazy-evaluation into master
5 files
+ 64
91
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 15
0
"""
variables "a" and "c" will not be evaluated
tests with: texts script -f short_circuiting.vm [-m deferred] --enable-logging --logging-level DEBUG
"""
a = 'abc'
b = if(true, 'xyz', a)
print(b)
c = a == 'abc'
d = false and c
print(d)
e = false
print(all(e, c))
print(any(not e, c))
Loading