Python Newbie

Michael Torrie torriem at gmail.com
Mon Feb 25 02:34:07 CET 2013


On 02/24/2013 03:40 PM, Mitya Sirenef wrote:
> But if block doesn't have to be inside a function, right? It needs
> to be inside a module, but then again everything is inside a module, but
> it wouldn't be very object-oriented if the module was the only object in
> Python :-).

A module indeed fits into the OOP paradigm.  It's called a singleton and
I love the fact that I can define and use them in python without
wrapping them in tons of boilerplate class and factory code.



More information about the Python-list mailing list