On Thu, Jan 29, 2009 at 2:01 AM, M Kumar <tomanis...@gmail.com> wrote: > Object oriented languages doesn't allow execution of the code without class > objects, what is actually happening when we execute some piece of code, is > it bound to any class?
That's not really the standard definition of object-oriented (c.f. Wikipedia), but by your definition (which seems Java/Ruby-centric, IMHO), Python would not be object-oriented. In addition to methods, Python has functions, which are not associated with a class and let you write code in a procedural style, thus failing your criterion. Python also has the top-level module scope, in which the code isn't even part of a method or function at all and thus certainly is not associated with a class, again not satisfying your criterion. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com -- http://mail.python.org/mailman/listinfo/python-list