Convert a value to a string if it's not None, a string, or a unicode (on Python 2).
(v)
| 1014 | |
| 1015 | @staticmethod |
| 1016 | def to_str_or_unicode_or_none(v): |
| 1017 | """ |
| 1018 | Convert a value to a string if it's not None, a string, |
| 1019 | or a unicode (on Python 2). |
| 1020 | """ |
| 1021 | if v is None or isinstance(v, str): |
| 1022 | return v |
| 1023 | else: |
| 1024 | return str(v) |
| 1025 | |
| 1026 | def description(self): |
| 1027 | desc = """\ |