[pypy-dev] Functions `.__module__` attribute

Antonio Cuni anto.cuni at gmail.com
Tue May 10 20:41:37 CEST 2011


On 10/05/11 20:39, cool-RR wrote:
> Ah, then my problem is easily solved by accessing `my_function.__module__`
> before I change `__name__` back to its original value. I tested and it works.

by the way, what do you need it for?

I think that, whatever you are doing, the best way is to explicitly assign
func.__module__ to the value you want.

ciao,
Anto


More information about the pypy-dev mailing list