Re: is python Object oriented??

2009-01-31 Thread Marc 'BlackJack' Rintsch
On Sat, 31 Jan 2009 15:28:14 -0800, thmpsn.m.k wrote: On Jan 31, 2:27 pm, Christian Heimes li...@cheimes.de wrote: Do you honestly believe that C++'s private members are really private? Privateness is only enforced during parsing time. Nobody can stop you from messing around with header files

Re: is python Object oriented??

2009-01-30 Thread Tim Rowe
2009/1/30 Hung Vo hungv...@gmail.com: I want to justify the above question (is Python Object-Oriented?). Does Python follow the concepts/practices of Encapsulation, Polymorphism and Interface, which are quite familiar to Java programmers? It's not the role of the language to follow those

Re: is python Object oriented??

2009-01-30 Thread Veerendra Ganiger
Python is not purely object oriented programming, because we can write functions without any class. You are right, predefined class attributes are available when we write or execute a piece of python code without defining class, that means it's just using objects for it's purpose. It does not mean

Re: is python Object oriented??

2009-01-30 Thread Grant Edwards
On 2009-01-30, Chris Rebert c...@rebertia.com wrote: On Thu, Jan 29, 2009 at 9:56 PM, Hung Vo hungv...@gmail.com wrote: snip I'm new to Python and also wondering about OOP in Python. I want to justify the above question (is Python Object-Oriented?). Does Python follow the concepts/practices

Re: is python Object oriented??

2009-01-30 Thread Michael Torrie
Hung Vo wrote: I'm new to Python and also wondering about OOP in Python. I want to justify the above question (is Python Object-Oriented?). Does Python follow the concepts/practices of Encapsulation, Polymorphism and Interface, which are quite familiar to Java programmers? I'd say

Re: is python Object oriented??

2009-01-30 Thread Michael Torrie
Veerendra Ganiger wrote: Python is not purely object oriented programming, because we can write functions without any class. You are right, predefined class attributes are available when we write or execute a piece of python code without defining class, that means it's just using objects for

Re: is python Object oriented??

2009-01-30 Thread Christian Heimes
Michael Torrie schrieb: It all depends on implementation, I think even we can make C object oriented with proper implementation. Indeed, any code based on gobject libraries can be object-oriented in design and function. The Python C API is a good example for well designed and object

Re: is python Object oriented??

2009-01-30 Thread Hung Vo
On Fri, Jan 30, 2009 at 5:15 PM, Chris Rebert c...@rebertia.com wrote: On Thu, Jan 29, 2009 at 9:56 PM, Hung Vo hungv...@gmail.com wrote: snip I'm new to Python and also wondering about OOP in Python. I want to justify the above question (is Python Object-Oriented?). Does Python follow

is python Object oriented??

2009-01-29 Thread M Kumar
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 -- Regards, Maneesh KB Comat Technologies Bangalore Mob:

Re: is python Object oriented??

2009-01-29 Thread Gary Herron
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 Python *is* object-oriented, but it is not (as your

Re: is python Object oriented??

2009-01-29 Thread Chris Rebert
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

Re: is python Object oriented??

2009-01-29 Thread Bruno Desthuilliers
(answering to the OP) M Kumar wrote: Object oriented languages doesn't allow execution of the code without class objects, Chapter and verse, please ? Nothing in the (very few) axioms of OOP mentions classes. You don't need classes to have an OOPL (ever heard about prototype-based languages

Re: is python Object oriented??

2009-01-29 Thread Muriel de Souza Godoi
Python offers support for object orientation, but it's not an object-oriented language. I mean, you can code a entire program in Python with no classes. So you use it if you want to. It's not like java, which you must use a class to code a Hello World, but Java isn't fully object-oriented,

Re: is python Object oriented??

2009-01-29 Thread Tino Wildenhain
Muriel de Souza Godoi wrote: Python offers support for object orientation, but it's not an object-oriented language. I mean, you can code a entire program in Python with no classes. So you use it if you want to. It's not like java, which you must use a class to code a Hello World, but Java

Re: is python Object oriented??

2009-01-29 Thread MC
Hi! Il se trouve que Chris Rebert a formulé : Python has functions, which are not associated with a class functions are methods of builtin... -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: is python Object oriented??

2009-01-29 Thread Steve Holden
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 a) This is a purely theoretical consideration. You

Re: is python Object oriented??

2009-01-29 Thread M Kumar
but still I am not clear of the execution of the code, when we write or execute a piece of python code without defining class, predefined class attributes are available (not all but __name__ and __doc__ are available). does it mean anything to this topic. Is it necessory to have __module__,

Re: is python Object oriented??

2009-01-29 Thread Luis M . González
On Jan 29, 7:21 am, Gary Herron gher...@islandtraining.com wrote: Python *is* object-oriented, but it is not (as your definition suggests) object-fascist.   I'm a python-nazi. No python for you! -- http://mail.python.org/mailman/listinfo/python-list

Re: is python Object oriented??

2009-01-29 Thread Stephen Hansen
On Thu, Jan 29, 2009 at 5:58 AM, M Kumar tomanis...@gmail.com wrote: but still I am not clear of the execution of the code, when we write or execute a piece of python code without defining class, predefined class attributes are available (not all but __name__ and __doc__ are available). does

Re: is python Object oriented??

2009-01-29 Thread Bruno Desthuilliers
MC a écrit : Hi! Il se trouve que Chris Rebert a formulé : Python has functions, which are not associated with a class functions are methods of builtin... Please check your facts. Python functions are not methods of anything (and not even necessarily attributes of a module - think about

Re: is python Object oriented??

2009-01-29 Thread Michael Torrie
M Kumar wrote: but still I am not clear of the execution of the code, when we write or execute a piece of python code without defining class, predefined class attributes are available (not all but __name__ and __doc__ are available). does it mean anything to this topic. Is it necessory to have

Re: is python Object oriented??

2009-01-29 Thread Terry Reedy
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 My take.. Python is a language. Programs written

Re: is python Object oriented??

2009-01-29 Thread Kay Schluehr
On 29 Jan., 11:21, Gary Herron gher...@islandtraining.com wrote: Python *is* object-oriented, but it is not (as your definition suggests) object-fascist.   I'd put it more mildly. Python is object oriented. The orientation is there but the fanatism is gone. Kay --

Re: is python Object oriented??

2009-01-29 Thread Ben Finney
MC xx.x...@xx.xmclaveaux.com writes: Hi! Il se trouve que Chris Rebert a formulé : Python has functions, which are not associated with a class functions are methods of builtin... No, because ‘builtin’ is not a class. -- \ “The shortest distance between two points is

Re: is python Object oriented??

2009-01-29 Thread Steven D'Aprano
On Thu, 29 Jan 2009 02:25:57 -0800, Chris Rebert wrote: In addition to methods, Python has functions, which are not associated with a class Yes they are. (lambda: None).__class__ type 'function' The function type itself has a class: (lambda: None).__class__.__class__ type 'type' --

Re: is python Object oriented??

2009-01-29 Thread Chris Rebert
On Thu, Jan 29, 2009 at 7:31 PM, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Thu, 29 Jan 2009 02:25:57 -0800, Chris Rebert wrote: In addition to methods, Python has functions, which are not associated with a class Yes they are. (lambda: None).__class__ type 'function'

Re: is python Object oriented??

2009-01-29 Thread Hung Vo
are really exposed when you start extending built-in types, or doing meta programming where you dynamically alter classes (and instance objects) on the fly. I'm new to Python and also wondering about OOP in Python. I want to justify the above question (is Python Object-Oriented?). Does Python follow

Re: is python Object oriented??

2009-01-29 Thread Hung Vo
are really exposed when you start extending built-in types, or doing meta programming where you dynamically alter classes (and instance objects) on the fly. I'm new to Python and also wondering about OOP in Python. I want to justify the above question (is Python Object-Oriented?). Does Python follow

Re: is python Object oriented??

2009-01-29 Thread Hung Vo
are really exposed when you start extending built-in types, or doing meta programming where you dynamically alter classes (and instance objects) on the fly. I'm new to Python and also wondering about OOP in Python. I want to justify the above question (is Python Object-Oriented?). Does Python follow

Re: is python Object oriented??

2009-01-29 Thread alex23
On Jan 30, 4:00 pm, Hung Vo hungv...@gmail.com wrote: Does Python follow the concepts/practices of Encapsulation, Polymorphism and Interface, which are quite familiar to Java programmers? Well, it has the same _concepts_, but definitely not the same practices/implementations. As they say,

Re: is python Object oriented??

2009-01-29 Thread Stephen Hansen
I'm new to Python and also wondering about OOP in Python. I want to justify the above question (is Python Object-Oriented?). Does Python follow the concepts/practices of Encapsulation, Polymorphism and Interface, which are quite familiar to Java programmers? Python does not enforce

Re: is python Object oriented??

2009-01-29 Thread Chris Rebert
On Thu, Jan 29, 2009 at 9:56 PM, Hung Vo hungv...@gmail.com wrote: snip I'm new to Python and also wondering about OOP in Python. I want to justify the above question (is Python Object-Oriented?). Does Python follow the concepts/practices of Encapsulation, Polymorphism and Interface, which

Re: is python Object oriented??

2009-01-29 Thread alex23
On Jan 30, 4:15 pm, Chris Rebert c...@rebertia.com wrote: - Python does not support interfaces in the Java sense (although there are a few third-party libraries that add such support); neither does Smalltalk. Instead, both Smalltalk and Python use duck-typing to similar effect.

Re: is python Object oriented??

2009-01-29 Thread Chris Rebert
On Thu, Jan 29, 2009 at 10:25 PM, alex23 wuwe...@gmail.com wrote: On Jan 30, 4:15 pm, Chris Rebert c...@rebertia.com wrote: - Python does not support interfaces in the Java sense (although there are a few third-party libraries that add such support); neither does Smalltalk. Instead, both

<    1   2