Commits

Walter Dörwald committed 81ba227

URLs werden jetzt caseinsensitiv verglichen.

  • Participants
  • Parent commits b8a120c

Comments (0)

Files changed (3)

 ----------
 The documentation expample has been enhanced. Now documenting methods works.
 
+When the member "elementname" in the element class is set before calling
+registerElement(), this element name will be used for the element. This
+allows custom name even when used registerAllElements().
+
+Comparison of scheme and server in URLs is done caseinsensitive (as RFC 2068)
+requires.)
 
 New in 0.3.4
 ------------
 		return new
 
 	def __cmp__(self,other):
-		return cmp(self.scheme,other.scheme) or cmp(self.server,other.server) or cmp(self.port,other.port) or cmp(self.path,other.path) or cmp(self.file,other.file) or cmp(self.ext,other.ext) or cmp(self.parameters,other.parameters) or cmp(self.query,other.query) or cmp(self.fragment,other.fragment)
+		return cmp(string.lower(self.scheme),string.lower(other.scheme)) or cmp(string.lower(self.server),string.lower(other.server)) or cmp(self.port,other.port) or cmp(self.path,other.path) or cmp(self.file,other.file) or cmp(self.ext,other.ext) or cmp(self.parameters,other.parameters) or cmp(self.query,other.query) or cmp(self.fragment,other.fragment)
 
 	def open(self):
 		return urllib.urlopen(self.asString())
 	"""
 	<par noindent>registers the element handler class <argref>element</argref> to be used
 	for elements with the appropriate name.
-	The element will be registered in the namespace <argref>namespacename</argref> and the element name
-	<argref>elementname</argref>. If <argref>elementname</argref> is <code>None<code>, the lowercase name
-	of the class will be used (to help prevent conflicts between Python keywords and class names
-	(e.g. for the HTML element del).</par>
+	The element will be registered in the namespace <argref>namespacename</argref>
+	and the element name <argref>elementname</argref>. If <argref>elementname</argref>
+	is <code>None</code>, the lowercase name of the class will be used (to help prevent
+	conflicts between Python keywords and class names (e.g. for the HTML element del)).</par>
 
 	<par>This function sets the class member <code>elementname</code> to the element name.
 	If this member is already present, the above method for determining the element name