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

All Samples(16)  |  Call(11)  |  Derive(0)  |  Import(5)
unicode(object='') -> unicode object
unicode(string[, encoding[, errors]]) -> unicode object

Create a new Unicode object from the given encoded string.
encoding defaults to the current default string encoding.
errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.

src/n/a/natsort-3.1.1/natsort/natsort.py   natsort(Download)
import sys
 
from .py23compat import u_format, py23_basestring, py23_range, py23_str, py23_zip
 
__doc__ = u_format(__doc__) # Make sure the doctest works for either python2 or python3
        if number_type not in (float, int) or number_type is not None:
            raise ValueError("natsort_key: 'number_type' "
                             "parameter '{0}'' invalid".format(py23_str(number_type)))
        elif signed not in (True, False):
            raise ValueError("natsort_key: 'signed' "
                             "parameter '{0}'' invalid".format(py23_str(signed)))
        elif exp not in (True, False):
            raise ValueError("natsort_key: 'exp' "
                             "parameter '{0}'' invalid".format(py23_str(exp)))

src/n/a/natsort-HEAD/natsort/natsort.py   natsort(Download)
import sys
 
from .py23compat import u_format, py23_basestring, py23_range, py23_str, py23_zip
 
__doc__ = u_format(__doc__) # Make sure the doctest works for either python2 or python3
        if number_type not in (float, int) or number_type is not None:
            raise ValueError("natsort_key: 'number_type' "
                             "parameter '{0}'' invalid".format(py23_str(number_type)))
        elif signed not in (True, False):
            raise ValueError("natsort_key: 'signed' "
                             "parameter '{0}'' invalid".format(py23_str(signed)))
        elif exp not in (True, False):
            raise ValueError("natsort_key: 'exp' "
                             "parameter '{0}'' invalid".format(py23_str(exp)))

src/n/a/natsort-3.1.1/natsort/__main__.py   natsort(Download)
from .natsort import regex_and_num_function_chooser
from ._version import __version__
from .py23compat import py23_str
 
 
        return [range_check(f[0], f[1]) for f in filt]
    except ValueError as a:
        raise ValueError('Error in --filter: '+py23_str(a))
 
 
        main()
    except ValueError as a:
        sys.exit(py23_str(a))
    except KeyboardInterrupt:
        sys.exit(1)

src/n/a/natsort-HEAD/natsort/__main__.py   natsort(Download)
from .natsort import regex_and_num_function_chooser
from ._version import __version__
from .py23compat import py23_str
 
 
        return [range_check(f[0], f[1]) for f in filt]
    except ValueError as a:
        raise ValueError('Error in --filter: '+py23_str(a))
 
 
        main()
    except ValueError as a:
        sys.exit(py23_str(a))
    except KeyboardInterrupt:
        sys.exit(1)

src/i/n/input_reader-1.2.2/input_reader/keylevel.py   input_reader(Download)
# -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
 
from .helpers import  ReaderError, SUPPRESS
from .py23compat import py23_str, py23_basestring
                    # Change all the globbed values to strings
                    for j, v in enumerate(glob):
                        glob[j] = py23_str(v)
                    glob = ' '.join(glob)
            elif not glob: