Python Forum
Timer class not working as expected.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer class not working as expected.
#2
Hello, first of all, you are missing 'self' argument for methods tripped() and getdates(). And second - if you want to execute the method you need to add parentheses like this:
print(tmr.getdates())
also for tripped method inside your while loop:
tmr.tripped()
otherwise they are just method references.
Reply


Messages In This Thread
RE: Timer class not working as expected. - by mlieqo - Feb-01-2019, 07:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python trivial endgame engine is not working as expected max22 0 618 Feb-24-2024, 04:41 PM
Last Post: max22
  Simple conditional not working as expected return2sender 8 1,114 Aug-27-2023, 10:39 PM
Last Post: return2sender
  Custom method to handle exceptions not working as expected gradlon93 3 1,128 Dec-22-2022, 07:12 PM
Last Post: deanhystad
Exclamation My code is not working as I expected and I don't know why! Marinho 4 1,175 Oct-13-2022, 08:09 PM
Last Post: deanhystad
  set and sorted, not working how expected! wtr 2 1,381 Jan-07-2022, 04:53 PM
Last Post: bowlofred
  email timer/rss feed timer ndiniz 1 2,152 Feb-02-2021, 07:18 PM
Last Post: nilamo
  append not working as expected teachinggeek 2 2,344 Apr-09-2020, 04:32 AM
Last Post: buran
  What is the strategy for working with class variables? AlekseyPython 3 3,095 Feb-24-2019, 05:34 AM
Last Post: AlekseyPython
  skeleton class needs working instantiation guard hereathome 3 3,153 Dec-10-2017, 03:35 PM
Last Post: hshivaraj
  How are these methods working within this class workerbee 3 3,013 Nov-29-2017, 04:15 PM
Last Post: hshivaraj

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020