shairubin / fun_with_ast

let's have fun manipulating ASTs in Python
Apache License 2.0
0 stars 1 forks source link

inner function malforms injected code #309

Closed shairubin closed 1 month ago

shairubin commented 1 month ago

def ref_lambda_rank_loss(): strudel.info('Function start def default') # STRUDEL_TRACE_0 def log_sigm(x): strudel.info('Function start def default') # STRUDEL_TRACE_0 return -np.log(1 + np.exp(-x)) # if you try to add code here identation will be broken dy = np.zeros(n) loss = 0