Open ldunham1 opened 4 years ago
https://github.com/mikemalinowski/qute/blob/736d3e57c9d3bb66e17bd4b61f24dc18e4faa349/qute/utilities/derive.py#L14
The six module can be useful for instances like this. For example, in this method, you're always unnecessarily paying the cost of testing against basestring if you're in Python 3.
basestring
Other option is to define the missing type once;
try: basestring except NameError: basestring = str
and then using basestring. This being said, it may also cause confusion :/
https://github.com/mikemalinowski/qute/blob/736d3e57c9d3bb66e17bd4b61f24dc18e4faa349/qute/utilities/derive.py#L14
The six module can be useful for instances like this. For example, in this method, you're always unnecessarily paying the cost of testing against
basestring
if you're in Python 3.Other option is to define the missing type once;
and then using basestring. This being said, it may also cause confusion :/