I’ve justed added 3 classes (not GR blocks) that allow C++ code to
evaluate functions defined in Python. This isn’t for performance
critical things, but will be useful in certain situations.

It uses SWIG “directors” to perform the magic.

Basically you subclass gr.feval_{dd,cc,ll} in python and define the
“eval” method. You can then pass instances of this to SWIG wrapped
C++ code and the “right thing happens”.

See gnuradio-core/src/lib/general/gr_feval.h for the classes
and gnuradio-core/src/python/gnuradio/gr/ for a trivial
of usage.