(cls)
return retval
Create a category on ``cls``.

    Usage:
        class SomeClass (Category(SomeClass)):
            def method(self):
                pass

    ``SomeClass`` is an existing class that will be rebound to the same
    value. The side-effect of this class definition is that the methods
    in the class definition will be added to the existing class.
Create a category on ``cls``.
Create a category on cls .
def Category(cls):
    """
    Create a category on ``cls``.

    Usage:
        class SomeClass (Category(SomeClass)):
            def method(self):
                pass

    ``SomeClass`` is an existing class that will be rebound to the same
    value. The side-effect of this class definition is that the methods
    in the class definition will be added to the existing class.
    """
    if not isinstance(cls, objc_class):
        raise TypeError("Category can only be used on Objective-C classes")
    retval = _CategoryMeta._newSubclass('Category', (), dict(real_class=cls))
    return retval
def Category ( cls ) : if not isinstance ( cls , objc_class ) : raise TypeError ( "Category can only be used on Objective-C classes" ) retval = _CategoryMeta . _newSubclass ( 'Category' , ( ) , dict ( real_class = cls ) ) return retval