[Subversion] / simplegeneric / simplegeneric.py  

Diff of /simplegeneric/simplegeneric.py

Parent Directory | Revision Log

version 2616, Fri Jul 30 01:48:53 2010 UTC version 2701, Thu Sep 1 02:47:24 2011 UTC
Line 1 
Line 1 
 __all__ = ["generic"]  __all__ = ["generic"]
   try:
 from types import ClassType, InstanceType  from types import ClassType, InstanceType
 classtypes = type, ClassType  classtypes = type, ClassType
   except ImportError:
       classtypes = type
       InstanceType = None
   
 def generic(func):  def generic(func):
     """Create a simple generic function"""      """Create a simple generic function"""
Line 36 
Line 39 
             return f              return f
         return decorate          return decorate
   
   
   
   
     _by_object = {}      _by_object = {}
     _gbo = _by_object.get      _gbo = _by_object.get
   
Line 87 
Line 87 
         optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,          optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
     )      )
   
   if __name__=='__main__':
       import unittest
       r = unittest.TextTestRunner()
       r.run(test_suite())
   
   
   


Generate output suitable for use with a patch program
Legend:
Removed from v.2616  
changed lines
  Added in v.2701

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help