How to define a function with an empty body?

David 71david at libero.it
Sun Sep 13 11:35:38 EDT 2009


Il Sat, 12 Sep 2009 22:37:01 -0500, Peng Yu ha scritto:

> Hi,
> 
> I want to define a function without anything in it body. 
[...]

I usually define void functions as:

def myfunction():
	raise NotImplementedError("You forgot to implement me!")


so I keep safe from leaving orphaned functions all over my code.



More information about the Python-list mailing list