docs: def serialize(self, elt, sw, pyobj, **kw):
          '''Must provice typecode to AnyElement for serialization, else
          try to use TC.Any to serialize instance which will serialize 
          based on the data type of pyobj w/o reference to XML schema 
          instance.
          '''
          if isinstance(pyobj, TypeCode):
              raise TypeError, 'pyobj is a typecode instance.'
          
          what = getattr(pyobj, 'typecode', None)
          if what is not None and type(pyobj) is types.InstanceType:
              tc = pyobj.__class__
              what = Any.serialmap.get(tc)
              if not what:
                  tc = (types.ClassType, pyobj.__class__.__name__)
                  what = Any.serialmap.get(tc)
          
          self.logger.debug('processContents: %s', self.processContents)
  
          # failed to find a registered type for class
          if what is None:
              #TODO: seems incomplete.  what about facets.
              #if self.processContents == 'strict':
              what = Any(pname=(self.nspname,self.pname))
                  
          self.logger.debug('serialize with %s', what.__class__.__name__)
          what.serialize(elt, sw, pyobj, **kw)