Package portage :: Class _unicode_func_wrapper
[hide private]

Class _unicode_func_wrapper

source code

object --+
         |
        _unicode_func_wrapper

Wraps a function, converts arguments from unicode to bytes, and return values to unicode from bytes. Function calls will raise UnicodeEncodeError if an argument fails to be encoded with the required encoding. Return values that are single strings are decoded with errors='replace'. Return values that are lists of strings are decoded with errors='strict' and elements that fail to be decoded are omitted from the returned list.

Instance Methods [hide private]
 
__init__(self, func, encoding=u'utf_8')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_process_args(self, args, kwargs) source code
 
__call__(self, *args, **kwargs) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  _encoding
  _func

Inherited from object: __class__

Method Details [hide private]

__init__(self, func, encoding=u'utf_8')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)