[Tutor] Are Empty "Placeholder" Functions possible?
Kent Johnson
kent37 at tds.net
Thu May 26 17:51:32 CEST 2005
Gooch, John wrote:
> Is there a way to create an empty function definition with no lines of code
> in it? In my coding style I will often do this ( in other languages ) for
> RAD just to remind myself that I will need to implement the function later.
A block cannot be empty but there is a placeholder statement 'pass' that does nothing.
>
> Example: For a file handling class, I may need functions such as
> copy,delete,move,etc so I want to start off with:
>
> class FileHandler:
> def __init__(self):
>
> def copy(self):
>
> def delete(self):
class FileHandler:
def __init__(self):
pass
def copy(self):
pass
def delete(self):
pass
Kent
More information about the Tutor
mailing list