(s)
| 116 | |
| 117 | @staticmethod |
| 118 | def __tostr(s): |
| 119 | if s is None: |
| 120 | return None |
| 121 | if isinstance(s, str): |
| 122 | return s |
| 123 | try: # keep Python 2 compatibility |
| 124 | return str(s, 'utf-8') |
| 125 | except TypeError: |
| 126 | return str(s) |
| 127 | |
| 128 | @staticmethod |
| 129 | def __tobytes(b): |
no outgoing calls
no test coverage detected