Frans Englich <[EMAIL PROTECTED]> writes: > The reason I thinks about this is I need to implement a debug print for my > program; very simple, a function/print statement that conditionally prints > its message whether a bool is true. Not overly complex.
As several folks have said, print is a statement, and Python doesn't really let you add statements to the language. You said you wanted to build a simple debugging function, so maybe this doesn't fit the bill, but for bigger pieces of code Python has a nice logging library. It's something like log4j or java.util.logging. http://www.python.org/doc/2.4/lib/module-logging.html -- http://mail.python.org/mailman/listinfo/python-list