2011 OCW 6.00 SC - PS 5 end part I am having a little bit of difficulty determining why the following works as a "triggerlist": t1 = SubjectTrigger("Obama") t2 = SummaryTrigger("Kenya") triggerlist = [t1, t2] But this does not triggerlist = [SubjectTrigger("Obama"), SubjectTrigger("Kenya")] Thanks
Python makes everything as an object then assigns it where it needs to be. I do not know for certain, but I am betting you are running up against some issue in that system.
This is the output when I run my script (note the objects are different, but the principle should be the same) [<__main__.SubjectTrigger object at 0x104025b90>, <__main__.TitleTrigger object at 0x104025bd0>] Polling... Sleeping... Polling... Sleeping...
Forgot to mention that the first line is the triggerlist that gets run through the main_thread(p) function.
Join our real-time social learning platform and learn together with your friends!