# RingMorphism defined by a python function

Is there a way to define a `RingHomomorphism`

object that calls a user defined function? I know this is possible for `SetMorphism`

, but I can't find a way to do the same for rings.

My use case: I have a python (or cython) function defining an embedding of a (finite) field into another. Of course, I could evaluate it on the generators of the domain and create a `RingHomomorphism_im_gens`

object, but my function is much faster to evaluate.