def __needs_encoding(self, s):
        """
        Get whether string I{s} contains special characters.

        @param s: A string to check.
        @type s: str
        @return: True if needs encoding.
        @rtype: boolean

        """
        if isinstance(s, basestring):
            for c in self.special:
                if c in s:
                    return True
def __needs_encoding ( self , s ) : if isinstance ( s , basestring ) : for c in self . special : if c in s : return True
Get whether string I{s} contains special characters.

        @param s: A string to check.
        @type s: str
        @return: True if needs encoding.
        @rtype: boolean