On Sunday 13 September 2009 05:37:01 Peng Yu wrote:
Hi,
I want to define a function without anything in it body. In C++, I can
do something like the following because I can use {} to denote an
empty function body. Since python use indentation, I am not sure how
to do it. Can somebody let me
Peng Yu schrieb:
Hi,
I want to define a function without anything in it body. In C++, I can
do something like the following because I can use {} to denote an
empty function body. Since python use indentation, I am not sure how
to do it. Can somebody let me know how to do it in python?
On Sat, 2009-09-12 at 22:37 -0500, Peng Yu wrote:
Hi,
I want to define a function without anything in it body. In C++, I can
do something like the following because I can use {} to denote an
empty function body. Since python use indentation, I am not sure how
to do it. Can somebody let me
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
On Sun, 13 Sep 2009 15:30:52 +0200, Christian Heimes wrote:
Peng Yu schrieb:
Hi,
I want to define a function without anything in it body. In C++, I can
do something like the following because I can use {} to denote an
empty function body. Since python use indentation, I am not sure how to
Hi,
I want to define a function without anything in it body. In C++, I can
do something like the following because I can use {} to denote an
empty function body. Since python use indentation, I am not sure how
to do it. Can somebody let me know how to do it in python?
void f() {
}
Regards,
Peng
On Sat, Sep 12, 2009 at 8:37 PM, Peng Yu pengyu...@gmail.com wrote:
Hi,
I want to define a function without anything in it body. In C++, I can
do something like the following because I can use {} to denote an
empty function body. Since python use indentation, I am not sure how
to do it. Can
Peng Yu wrote:
Hi,
I want to define a function without anything in it body. In C++, I can
do something like the following because I can use {} to denote an
empty function body. Since python use indentation, I am not sure how
to do it. Can somebody let me know how to do it in python?