Skip to content

Commit

Permalink
comments for Fab
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Lefévère-Laoide authored and Fred Lefévère-Laoide committed Sep 25, 2024
1 parent ebc3ab4 commit a7bdbbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions taipy/gui/_renderers/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def _get_variable_hash_names(
looks_like_a_lambda = False
val = v
if callable(val):
# if it's not a callable (and not a string), forget it
if val.__name__ == "<lambda>":
# if it is a lambda and it has already a hash_name, we're fine
if looks_like_a_lambda or not hash_name:
hash_name = gui._get_lambda_id(val)
gui._bind_var_val(hash_name, val) # type: ignore[arg-type]
Expand Down
1 change: 1 addition & 0 deletions taipy/gui/utils/_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def __save_expression(
if expr_hash is None:
expr_hash = _get_expr_var_name(expr)
elif not lambda_expr:
# if lambda expr, it has a hasname, we work with that
# edge case, only a single variable
expr_hash = f"tpec_{_get_client_var_name(expr)}"
self.__expr_to_hash[expr] = expr_hash
Expand Down

0 comments on commit a7bdbbe

Please sign in to comment.