the function was called the descriptiona sillier function the namesecond_function the classnow 'll call the function passed in the second was called we set an attribute on the functionnamed description (not very good descriptionsadmittedlywe were also able to see the function' __name__ attributeand to access its classdemonstrating that the function really is an object with attributes then we called the function by using the callable syntax (the parenthesesthe fact that functions are top-level objects is most often used to pass them around to be executed at later datefor examplewhen certain condition has been satisfied let' build an event-driven timer that does just thisimport datetime import time class timedeventdef __init__(selfendtimecallback)self endtime endtime self callback callback def ready(self)return self endtime <datetime datetime now(class timerdef __init__(self)self events [def call_after(selfdelaycallback)end_time datetime datetime now(datetime timedelta(seconds=delayself events append(timedevent(end_timecallback)def run(self)while trueready_events ( for in self events if ready()for event in ready_eventsevent callback(selfself events remove(eventtime sleep(