Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 19 Online
OpenStudy (anonymous):

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

OpenStudy (e.mccormick):

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.

OpenStudy (anonymous):

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...

OpenStudy (anonymous):

Forgot to mention that the first line is the triggerlist that gets run through the main_thread(p) function.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!