[Tutor] Is defining functions as dummies pythonic?

Alan Gauld alan.gauld at blueyonder.co.uk
Fri Apr 16 03:36:10 EDT 2004

> if isverbose:
>     def verbosize(text=""):
>         print text
> else:
>     def verbosize(text=""):
>         pass
> However, defining functions based on parameters seems to be, well,

Nope its perfectly legitimate. Its one of the things you can
only do in a dynamic language like Python which is why you
don't see it done very often, but its good.

Alan G.

More information about the Tutor mailing list