handcalcs icon indicating copy to clipboard operation
handcalcs copied to clipboard

Impossible to reproduce example from "Basic Usage 2", using ```@handcalcs()``` generates a function that doesn't output anything

Open ragdollfun opened this issue 2 years ago • 4 comments

I'm trying to reproduce the example from "Basic Usage 2: As a decorator on your functions, @handcalc()", but the variable vals is empty in my case.

Using @handcalc(jupyter_display=True) does render the LaTeX formulas correctly, but the value of vals is None.

ragdollfun avatar Nov 05 '23 17:11 ragdollfun

Same here, image

scote89 avatar Nov 10 '23 15:11 scote89

@ragdollfun and @scote89

It goes like this: image

Thanks for pointing out that the return statement is missing from the example. On a previous version of handcalcs, the locals() dictionary was returned without having to use the return statement. That is no longer the case.

I have just updated the example.

connorferster avatar Nov 10 '23 20:11 connorferster

Hi Connor. Simple question. It is possible to add comments to functions with decorators? Thanks.

gusto475 avatar Dec 22 '23 14:12 gusto475

Yes, by using """comments""'.

DonCammne avatar Mar 01 '24 17:03 DonCammne