this example isn' much different from the earlier classall we did was change the name of the repeater function to __call__ and pass the object itself as callable note that when we make the call_after callwe pass the argument repeater(those two parentheses are creating new instance of the classthey are not explicitly calling the class this happens laterinside the timer if we want to execute the __call__ method on newly instantiated objectwe' use rather odd syntaxrepeater()(the first set of parentheses constructs the objectthe second set executes the __call__ method if we find ourselves doing thiswe may not be using the correct abstraction only implement the __call__ function on an object if the object is meant to be treated like function case study to tie together some of the principles presented in this let' build mailing list manager the manager will keep track of -mail addresses categorized into named groups when it' time to send messagewe can pick group and send the message to all -mail addresses assigned to that group nowbefore we start working on this projectwe ought to have safe way to test itwithout sending -mails to bunch of real people luckilypython has our back herelike the test http serverit has built-in simple mail transfer protocol (smtpserver that we can instruct to capture any messages we send without actually sending them we can run the server with the following commandpython - smtpd - - debuggingserver localhost: running this command at command prompt will start an smtp server running on port on the local machine but we've instructed it to use the debuggingserver class (it comes with the built-in smtp module)whichinstead of sending mails to the intended recipientssimply prints them on the terminal screen as it receives them neatehnowbefore writing our mailing listlet' write some code that actually sends mail of coursepython supports this in the standard librarytoobut it' bit of an odd interfaceso we'll write new function to wrap it all cleanlyimport smtplib from email mime text import mimetext def send_email(subjectmessagefrom_addr*to_addrs