Did I find the right examples for you? yes no

All Samples(12)  |  Call(6)  |  Derive(0)  |  Import(6)

        def repr2(obj):
    """
    Don't mark unicode strings with u in Python 2
    """
    if not PY3:
        return repr(obj).lstrip("u")
    else:
        return repr(obj)
        


src/p/y/python-creole-1.1.1/creole/shared/utils.py   python-creole(Download)
import shlex
 
from creole.py3compat import TEXT_TYPE, PY3, repr2
 
 
    attr_list = []
    for key, value in sorted(d.items()):
        value_string = repr2(value)
        attr_list.append("%s=%s" % (key, value_string))
    return " ".join(attr_list)

src/p/y/python-creole-HEAD/creole/shared/utils.py   python-creole(Download)
import shlex
 
from creole.py3compat import TEXT_TYPE, PY3, repr2
 
 
    attr_list = []
    for key, value in sorted(d.items()):
        value_string = repr2(value)
        attr_list.append("%s=%s" % (key, value_string))
    return " ".join(attr_list)

src/p/y/python-creole-1.1.1/creole/creole2html/emitter.py   python-creole(Download)
 
from creole.creole2html.parser import CreoleParser
from creole.py3compat import TEXT_TYPE, repr2
from creole.shared.utils import string2dict
 
            return self.error(
                "Wrong macro arguments: %s for macro '%s' (maybe wrong macro tag syntax?)" % (
                    repr2(args), macro_name
                ),
                exc_info

src/p/y/python-creole-HEAD/creole/creole2html/emitter.py   python-creole(Download)
 
from creole.creole2html.parser import CreoleParser
from creole.py3compat import TEXT_TYPE, repr2
from creole.shared.utils import string2dict
 
            return self.error(
                "Wrong macro arguments: %s for macro '%s' (maybe wrong macro tag syntax?)" % (
                    repr2(args), macro_name
                ),
                exc_info

src/p/y/python-creole-HEAD/creole/tests/test_macros.py   python-creole(Download)
from __future__ import division, absolute_import, print_function, unicode_literals
 
from creole.py3compat import repr2
 
 
    '[test macro1 - kwargs: a=1,b=2]'
    """
    kwargs = ','.join(['%s=%s' % (k, repr2(v)) for k, v in sorted(kwargs.items())])
    return "[test macro1 - kwargs: %s]" % kwargs
 

src/p/y/python-creole-1.1.1/creole/tests/test_macros.py   python-creole(Download)
from __future__ import division, absolute_import, print_function, unicode_literals
 
from creole.py3compat import repr2
 
 
    '[test macro1 - kwargs: a=1,b=2]'
    """
    kwargs = ','.join(['%s=%s' % (k, repr2(v)) for k, v in sorted(kwargs.items())])
    return "[test macro1 - kwargs: %s]" % kwargs