| Parameters: |
|
|---|---|
| Returns: | text or a unicode incoming encoded representation of it. |
| Raises TypeError: | |
If text is not an instance of str |
|
Encodes incoming text/bytes string using encoding.
If incoming is not specified, text is expected to be encoded with current python’s default encoding. (sys.getdefaultencoding)
| Parameters: |
|
|---|---|
| Returns: | text or a bytestring encoding encoded representation of it. |
| Raises TypeError: | |
If text is not an instance of str |
|