AttributeError: module 'time' has no attribute 'clock' in Python 3.8

前端 未结 6 1784
悲哀的现实
悲哀的现实 2020-11-30 12:11

I have written code to generate public and private keys. It works great at Python 3.7 but it fails in Python 3.8. I don\'t know how it fails in the latest version. Help me w

6条回答
  •  天命终不由人
    2020-11-30 12:38

    From the Python 3.8 doc:

    The function time.clock() has been removed, after having been deprecated since Python 3.3: use time.perf_counter() or time.process_time() instead, depending on your requirements, to have well-defined behavior. (Contributed by Matthias Bussonnier in bpo-36895.)

提交回复
热议问题