[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Comments System



I've gotten into the habit of putting the following code into most new classes I create. Does it make sense, or is there a better way to include the togglable debug messages I'm trying to make?

def Comment(self,what):
    if self.comments:
        print "["+self.name+"] "+str(what)

eg.:

>>> my_object.Comment(42)
[Name Of Object] 42