Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VRE Language
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KIT
virtmat-tools
VRE Language
Merge requests
!306
Draft: Resolve "Short circuiting and lazy evaluation"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Draft: Resolve "Short circuiting and lazy evaluation"
49-short-circuiting-and-lazy-evaluation
into
master
Overview
0
Commits
29
Pipelines
13
Changes
2
Open
Ivan Kondov
requested to merge
49-short-circuiting-and-lazy-evaluation
into
master
3 months ago
Overview
0
Commits
29
Pipelines
13
Changes
2
Expand
Closes
#49
0
0
Merge request reports
Viewing commit
30129053
Prev
Next
Show latest version
2 files
+
32
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
30129053
add tests for short-circuiting or/and expressions and non-strict if function
· 30129053
Ivan Kondov
authored
3 months ago
src/virtmat/language/interpreter/instant_executor.py
+
4
−
3
Options
@@ -39,10 +39,11 @@ comp_map = dict(zip(comp_operators, comp_functions))
def
log_eval
(
func
):
"""
a logger indicating when a value property is eventually evaluated
"""
logger
=
get_logger
(
__name__
)
def
logged_value
(
obj
):
ret
=
func
(
obj
)
logger
.
debug
(
'
evaluated %s: %s
'
,
repr
(
obj
),
ret
)
return
ret
ret
_val
=
func
(
obj
)
logger
.
debug
(
'
evaluated %s: %s
'
,
repr
(
obj
),
ret
_val
)
return
ret
_val
return
logged_value
Loading