James Westby ha scritto: > try: > import json > except ImportError: > import simplejson as json
Yes, it works in many circumstances, at least at those I saw so far.
In this case, code could become: try: import json as simplejson except ImportError: import simplejson
Maybe upstream is interested in using that.
James Westby ha scritto:
> try:
> import json
> except ImportError:
> import simplejson as json
Yes, it works in many circumstances, at least at those I saw so far.
In this case, code could become:
try:
import json as simplejson
except ImportError:
import simplejson
Maybe upstream is interested in using that.