Determines whether the passed value is a string, safe for 2/3.
(val)
| 164 | |
| 165 | |
| 166 | def is_string(val): |
| 167 | """Determines whether the passed value is a string, safe for 2/3.""" |
| 168 | try: |
| 169 | basestring |
| 170 | except NameError: |
| 171 | return isinstance(val, str) |
| 172 | return isinstance(val, basestring) |
| 173 | |
| 174 | |
| 175 | def time(arg): |