Hakon.Dreyergeodata-no-esridist

Breaking time

Discussion created by Hakon.Dreyergeodata-no-esridist Employee on Sep 12, 2018
Latest reply on Oct 22, 2018 by achapkowski-esristaff

Hi, it seems importing the GIS breaks a former from time import time import as demonstrated in the following example.

 

          Code sample

Switching the imports works, but it's not intuitive, and neither very PEP 8.

It seems time.sleep() is the only function from the time module that are used in the API, and it is only used twice, in Item.export() and Item._check_publish_status().
Still, there are three instances of import time scattered around in the __init__.py file. Wouldn't it be better to narrow the import to a from time import sleep in the imports at top of the file?

Outcomes