Alan Gauld wrote:

     def getDOMDocument(self):
     def getDOMDocument(self, namespaceUri=__defaultNamespaceUri):
def getDOMDocument(self, namespaceUri=__defaultNamespaceUri, qualifiedName=__defaultQualifiedName):
 >      def getDOMDocument(self,
                          namespaceUri=__defaultNamespaceUri,
                          qualifiedName=__defaultQualifiedName,
                          docType=__defaultDoctype):

These definitions all define the same object. There is no function overloading in Python. You can often fake it with suitable use of default arguments. This looks likely here.

Another alternative is the generics implementation from pkgutil:

from pkgutil import simplegeneric

See the source code for details -- simplegeneric is public but undocumented. From time to time people make noise about documenting it and moving it into its own module, but this is volunteer-driven and it hasn't happened yet.



--
Steven

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to