0

I'm trying to make instance by the code as below

but I found that time() is not working well when it belong to args. I don't know why TT

from time import time
class fourcal:
  def setda(self, a, b,t = time()):
    self.a = a
    self.b = b
    self.t = time()
    print(t)
    print(self.t)

you can found that result by print(t) is same for two instance.

enter image description here

petezurich
  • 9,280
  • 9
  • 43
  • 57
runRyan
  • 713
  • 1
  • 5
  • 13

0 Answers0