Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: is python Object oriented??

Reply
Thread Tools

Re: is python Object oriented??

 
 
Laszlo Nagy
Guest
Posts: n/a
 
      01-31-2009
M Kumar 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?
> Those who have time and consideration can help me

There are many kinds of definitions for "object oriented" languages. I
have learned some things in the University, and one of them was making
distinction between "pure object oriented" languages, and "mixed" languages.

Pure object oriented languages does not have programming tools that are
non-objects. A good example was SmallTalk, if I remember correctly.

Python is not a pure object oriented language, because it has other
programming tools, for example functions.

However, your question seems to be pedantry. As others would say, "you
can do programming in FORTRAN in any language". In other words, it is
possible to use Python in a non object-oriented way, but the "good" way
of using it is defining classes and making objects... So Python *is*
object oriented, if you use it the right way. There might be a
definition of "object oriented language" that does not apply to Python,
and theoretically, you could say that according to that definition,
Python is not object oriented. But practically, it is!

Best,

Laszlo

 
Reply With Quote
 
 
 
 
Andreas Waldenburger
Guest
Posts: n/a
 
      01-31-2009
On Sat, 31 Jan 2009 09:11:03 +0100 Laszlo Nagy <(E-Mail Removed)>
wrote:

> Python is not a pure object oriented language, because it has other
> programming tools, for example functions.


I'm not sure about the first part of the sentence, but Python's
functions are objects. Check it in the interpreter: attributes,
methods, the whole caboodle.

regards,
/W

--
My real email address is constructed by swapping the domain with the
recipient (local part).
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
conversion of Python object to perl object srinivasan srinivas Python 0 08-17-2009 10:47 AM
boost.python Event object wrapped with bp::object() Alexander Eisenhuth Python 0 02-13-2008 03:38 PM
Working with C object of python object (pycairo,ctypes) AngelBlaZe Python 1 02-27-2007 09:37 AM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
reading a python file object in c extension crashes python travis ray Python 0 06-13-2005 11:50 PM



Advertisments