[oclug] python help with multiline comments

James Lockie bjlockie at lockie.ca
Sun Jan 28 12:11:15 EST 2007


I tried to comment out some code with """ but now I get a syntax error:


        # Try and decode message
"""
        try:
             message = message.decode('utf8')
        except:
            self.log("DecodeError: Could not decode '%s', trying to 
encode." % $

            try:
                message = message.encode('utf8', "replace")
            except:
                self.log("EncodeError: Could not encode '%s'" % message)
                return
"""

        # Censors message if necessary
        if self.config.getboolean("AmarokGaim", "censor"):
            # Builds a regular expression for matching expletives
            expletives = self.config.get("AmarokGaim", "censor_words")



More information about the OCLUG mailing list