On 05/07/17 16:37, David Rock wrote: > This is a question about the benefits of using a main() function vs not.
Others have answered for the pros, but I confess that I don't always use a main(), but only if all I'm doing is, say, instantiating a class and running a method. For anything more complex I'd write a main() (or test() or demo() ) to go inside the if name==main clause. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor