1. Martin von Löwis
  2. xist-3k


Walter Dörwald  committed b8a120c

Uurgs, hasattr() hat auch in den Basisklassen nach den Attributen
geguckt, d.h. wenn man ein abgeleitetes Element registeriert hat,
wurde es immer unter dem Namen der Basisklasse registeriert.

  • Participants
  • Parent commits 942a98e
  • Branches default

Comments (0)

Files changed (1)

File xist/xsc.py

View file
 	<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
 	will be skipped, and this member will be used.</par>
 	element.namespacename = namespacename
-	if hasattr(element,"elementname"):
+	if element.__dict__.has_key("elementname"):
 		elementname = element.elementname
 		if elementname is None: