Re: is python Object oriented??

Discussion in 'Python' started by Laszlo Nagy, Jan 31, 2009.

  1. Laszlo Nagy

    Laszlo Nagy Guest

    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
     
    Laszlo Nagy, Jan 31, 2009
    #1
    1. Advertising

  2. On Sat, 31 Jan 2009 09:11:03 +0100 Laszlo Nagy <>
    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).
     
    Andreas Waldenburger, Jan 31, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Hathaway
    Replies:
    0
    Views:
    428
    Robert Hathaway
    Jul 29, 2003
  2. Robert Hathaway
    Replies:
    0
    Views:
    432
    Robert Hathaway
    Jul 29, 2003
  3. Robert Hathaway
    Replies:
    1
    Views:
    475
    Robert J Hathaway III
    Jul 29, 2003
  4. Replies:
    2
    Views:
    468
    Bruno Desthuilliers
    May 26, 2008
  5. rolo
    Replies:
    3
    Views:
    197
    Robert Klemme
    Apr 9, 2004
Loading...

Share This Page