Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
Class decorator. You implement __repr__() returning a
unicode string, and in Python 2, I encode it for you.

            def implements_repr(cls):
        '''Class decorator. You implement __repr__() returning a
        unicode string, and in Python 2, I encode it for you.
        '''
        cls.__repr_unicode__ = cls.__repr__

        def wrapper(self):
            return self.__repr_unicode__().encode('utf-8')
        cls.__repr__ = wrapper
        return cls
        


src/n/i/nine-0.3.3/nine/test_nine.py   nine(Download)
    def test_import(self):
        from nine import (IS_PYTHON2, str, basestring, native_str,
            integer_types, class_types, range, range_list, reraise,
            iterkeys, itervalues, iteritems, map, zip, filter, input,
            implements_iterator, implements_to_string, implements_repr, nine,

src/n/i/nine-HEAD/nine/test_nine.py   nine(Download)
    def test_import(self):
        from nine import (IS_PYTHON2, str, basestring, native_str,
            integer_types, class_types, range, range_list, reraise,
            iterkeys, itervalues, iteritems, map, zip, filter, input,
            implements_iterator, implements_to_string, implements_repr, nine,