May-03-2019, 03:01 AM
i have a long (over 200, potential a lot more) list of names. for each name i need to create a function of that name in the local namespace. each function will basically be the same, using the same common code. but the logic of this code needs to know what its name is. is there a way to do that? is there a way to set that up? the function will make a request of a remote server and the action name (camel case) of that request will be derived from the name of the function (snake case). the function will do the conversion then send the request.
i tried making a deep copy of a function but when i set .__name__ on one of them it changes it to that on the copies, too. so it's still just a reference to one function.
i tried making a deep copy of a function but when i set .__name__ on one of them it changes it to that on the copies, too. so it's still just a reference to one function.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.