On Jan 31, 1:54 am, Christian Heimes li...@cheimes.de wrote:
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
thmpsn@gmail.com a écrit :
On Feb 4, 3:11 am, Bruno Desthuilliers bruno.
42.desthuilli...@websiteburo.invalid wrote:
thmpsn@gmail.com a écrit :
On Feb 3, 1:14 am, David Cournapeau courn...@gmail.com wrote:
(snip)
after all, we have used FILE* for years and I have no idea about the
Gabriel Genellina a écrit :
En Mon, 02 Feb 2009 19:51:11 -0200, Russ P. russ.paie...@gmail.com
escribió:
Suppose a library developer (or a module developer on a large team)
uses leading underscores. Now suppose that, for whatever reason
(pressure from the users, perhaps), the library
thmpsn@gmail.com a écrit :
On Feb 3, 1:14 am, David Cournapeau courn...@gmail.com wrote:
(snip)
after all, we have used FILE* for years and I have no idea about the FILE
structure.
Your lack of knowledge about it doesn't mean that it has somehow
magically private members. The only reason
Russ P. a écrit :
On Feb 3, 4:14 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 05:37:57 -, Russ P. russ.paie...@gmail.com wrote:
(snip)
If a library developer releases the source code of a library, any user
can trivially defeat the access restrictions. But if a
Steven D'Aprano a écrit :
On Tue, 03 Feb 2009 12:09:46 +0100, Bruno Desthuilliers wrote:
I love Python, and I'm greedy and want it all: I want a dynamic,
easy-to- use language *and* a compiler that can protect me from myself
That's not what compilers are for.
So you say.
While it's quite
Quoting Russ P. russ.paie...@gmail.com:
Indeed he can. He can even do that in Python; it just requires a little
self-discipline from the team, or a validation script on the code
repository if he really doesn't trust them. Not only can this be done
without forcing the rest of the world
Quoting Russ P. russ.paie...@gmail.com:
Imagine you own a company, and you decide to lease an office building.
Would you expect the office doors to have locks on them? Oh, you
would? Why? You mean you don't trust your co-workers? What are locks
but enforced access restriction?
This analogy
On Feb 4, 5:35 am, Luis Zarrabeitia ky...@uh.cu wrote:
Quoting Russ P. russ.paie...@gmail.com:
Imagine you own a company, and you decide to lease an office building.
Would you expect the office doors to have locks on them? Oh, you
would? Why? You mean you don't trust your co-workers? What
En Wed, 04 Feb 2009 07:05:22 -0200, Bruno Desthuilliers
bruno.42.desthuilli...@websiteburo.invalid escribió:
Gabriel Genellina a écrit :
En Mon, 02 Feb 2009 19:51:11 -0200, Russ P. russ.paie...@gmail.com
escribió:
Suppose a library developer (or a module developer on a large team)
uses
Hendrik van Rooyen wrote:
Scott David Daniels s..@acm.org wrote:
You might enjoy looking at QNX, since I think it is built along the
lines you are describing here. I have an ancient copy of their OS,
but haven't followed for more than couple of decades.
I vaguely know about it, and I
On Feb 4, 3:11 am, Bruno Desthuilliers bruno.
42.desthuilli...@websiteburo.invalid wrote:
thmpsn@gmail.com a écrit :
On Feb 3, 1:14 am, David Cournapeau courn...@gmail.com wrote:
(snip)
after all, we have used FILE* for years and I have no idea about the FILE
structure.
Your lack
Russ P. russ.paie...@gmail.com writes:
Imagine you own a company, and you decide to lease an office building.
Would you expect the office doors to have locks on them? Oh, you
would? Why? You mean you don't trust your co-workers? What are locks
but enforced access restriction?
Huh? The lock
Steven D'Aprano ste...@remove.this.cybersource.com.au writes:
Now, that's a toy example. Languages like Ada make correctness proofs,
well, perhaps not easy, but merely difficult compared to impossible for
languages like Python.
Say `generally impractical' rather than `impossible' and I'll
On Wednesday 04 February 2009 10:53:54 am Russ P. wrote:
On Feb 4, 5:35 am, Luis Zarrabeitia ky...@uh.cu wrote:
Quoting Russ P. russ.paie...@gmail.com:
This analogy is nonsense. There is no way you will execute code on my
system if I don't authorize it, regardless of how public are the
* Russ P. (Tue, 3 Feb 2009 21:04:30 -0800 (PST))
Imagine you own a company, and you decide to lease an office building.
Would you expect the office doors to have locks on them? Oh, you
would? Why? You mean you don't trust your co-workers? What are locks
but enforced access restriction?
What
Stephen Hansen wrote:
8 - arguments I don't agree with -
P.S. Aiee, this discussion is getting overwhelmingly long. :)
It is indeed and I do actually have other stuff to do so I shall
try to retreat with defiant dignity.
Been fun though, to see the other viewpoints when
Diez B. Roggisch de...@nospam.web.de
Your argument would be valid if *any* of the *languages* implementing
encapsulation would offer that real isolation. None does. So where from
comes the feeling that this must be something a *language* should offer?
Sure one could envision a system where
On Tue, 03 Feb 2009 03:48:58 +, Rhodri James wrote:
On Tue, 03 Feb 2009 02:16:01 -, Russ P. russ.paie...@gmail.com
wrote:
Here we go again. If you have access to the source code (as you nearly
always do with Python code), then breaking the language-enforced data
hiding is a trivial
On Feb 3, 12:45 am, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
Another extreme position is that enforced data hiding is useless, that
there is *never* any need for it *at all*, and therefore Python doesn't
need it, there's no reason except stupid PHB's belief in cargo-cult
* Russ P. (Mon, 2 Feb 2009 13:51:11 -0800 (PST))
On Feb 2, 9:02 am, thmpsn@gmail.com wrote:
Several participants here keep repeating that the leading-underscore
convention is perfectly adequate. Aside from the aesthetic problem of
littering code with leading underscores, let me try to
* thmpsn@gmail.com (Mon, 2 Feb 2009 09:02:13 -0800 (PST))
On Feb 2, 2:55 am, Stephen Hansen apt.shan...@gmail.com wrote:
This is proven
by your statement above, whereby you are driving a user away,
simply because the language, in one small aspect, does not
give him what he wants,
Thorsten Kampe wrote:
This scenario is highly supposing and doesn't look like a real-world-
case to me. But anyway: the obvious solution in my humble opinion would
be to do something like public_attribute = _private_attribute. But
that would be too simple, too unjavaesque, right?!
Yes, the
* Marco Mariani (Tue, 03 Feb 2009 10:42:06 +0100)
Thorsten Kampe wrote:
This scenario is highly supposing and doesn't look like a
real-world- case to me. But anyway: the obvious solution in my
humble opinion would be to do something like public_attribute =
_private_attribute. But that
Hendrik van Rooyen wrote:
Diez B. Roggisch de...@nospam.web.de
...Sure one could envision a system where each object is running in it's
micro-process.
... I would have loved a
language that supported it, as well as an operating system
(and I do not mean stuff like tiny os and others of that
Why? - Python is object oriented, but I can write whole systems
without defining a single class.
By analogy, if data hiding is added to language, I could write a
whole system without hiding a single item.
I guess the problem is that you would not be able to use some libraries
because their
On Feb 3, 1:14 am, David Cournapeau courn...@gmail.com wrote:
On Tue, Feb 3, 2009 at 2:37 PM, Russ P. russ.paie...@gmail.com wrote:
On Feb 2, 7:48 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 02:16:01 -, Russ P. russ.paie...@gmail.com wrote:
Here we go again.
Steven D'Aprano a écrit :
On Tue, 03 Feb 2009 03:48:58 +, Rhodri James wrote:
On Tue, 03 Feb 2009 02:16:01 -, Russ P. russ.paie...@gmail.com
wrote:
Here we go again. If you have access to the source code (as you nearly
always do with Python code), then breaking the language-enforced
On Wed, Feb 4, 2009 at 2:36 AM, thmpsn@gmail.com wrote:
On Feb 3, 1:14 am, David Cournapeau courn...@gmail.com wrote:
On Tue, Feb 3, 2009 at 2:37 PM, Russ P. russ.paie...@gmail.com wrote:
On Feb 2, 7:48 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 02:16:01
On Feb 3, 12:05 pm, David Cournapeau courn...@gmail.com wrote:
On Wed, Feb 4, 2009 at 2:36 AM, thmpsn@gmail.com wrote:
On Feb 3, 1:14 am, David Cournapeau courn...@gmail.com wrote:
On Tue, Feb 3, 2009 at 2:37 PM, Russ P. russ.paie...@gmail.com wrote:
On Feb 2, 7:48 pm, Rhodri James
En Mon, 02 Feb 2009 19:51:11 -0200, Russ P. russ.paie...@gmail.com
escribió:
Suppose a library developer (or a module developer on a large team)
uses leading underscores. Now suppose that, for whatever reason
(pressure from the users, perhaps), the library developer decides to
change a
On Tue, 03 Feb 2009 05:37:57 -, Russ P. russ.paie...@gmail.com wrote:
On Feb 2, 7:48 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 02:16:01 -, Russ P. russ.paie...@gmail.com
wrote:
Here we go again. If you have access to the source code (as you nearly
Quoth David Cournapeau courn...@gmail.com:
On Wed, Feb 4, 2009 at 2:36 AM, thmpsn@gmail.com wrote:
Pretty much, unless maybe the code documents what you're not supposed
to access:
But that's my point: that's just not true for many packages I have
used - some packages do follow the
On Tue, 03 Feb 2009 08:45:23 -, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
I find this extreme position is rather incoherent. If I may paraphrase
the argument as I see it:
Enforced data hiding is useless, because it is utterly trivial to bypass
it, AND it's wicked,
On Tue, 03 Feb 2009 10:20:28 +0100, Thorsten Kampe wrote:
If a private keyword (or equivalent) were available, then the change
would need to be made in only one location rather than at every
occurrence off the identifier. That is much less error prone. Sure, you
can argue (as I'm sure
On Wed, Feb 4, 2009 at 4:10 AM, thmpsn@gmail.com wrote:
What limitations? The only limitations I see are the ones associated
with opaque types (what you mentioned above).
Opaque type are used in C++ as well, for data hiding - if
private/public were that great for data hiding, the PIMPL
On Feb 3, 4:05 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 08:45:23 -, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
I find this extreme position is rather incoherent. If I may paraphrase
the argument as I see it:
Enforced data hiding is
On Feb 3, 4:14 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 05:37:57 -, Russ P. russ.paie...@gmail.com wrote:
On Feb 2, 7:48 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 02:16:01 -, Russ P. russ.paie...@gmail.com
wrote:
Here
On Wed, 04 Feb 2009 01:13:32 -, Russ P. russ.paie...@gmail.com wrote:
On Feb 3, 4:05 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
I'm very much of the second opinion; it was Russ who did the sudden
volte
face and declared that it was trivial to circumvent.
Whoa! Hold on a minute
On Feb 3, 7:49 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Wed, 04 Feb 2009 01:13:32 -, Russ P. russ.paie...@gmail.com wrote:
On Feb 3, 4:05 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
I'm very much of the second opinion; it was Russ who did the sudden
volte
face
On Tue, 03 Feb 2009 12:09:46 +0100, Bruno Desthuilliers wrote:
I love Python, and I'm greedy and want it all: I want a dynamic,
easy-to- use language *and* a compiler that can protect me from myself
That's not what compilers are for.
So you say.
and bad data.
I definitly fail to see
Scott David Daniels s..@acm.org wrote:
You might enjoy looking at QNX, since I think it is built along the
lines you are describing here. I have an ancient copy of their OS,
but haven't followed for more than couple of decades.
I vaguely know about it, and I know they claim to be hot on
rd.mur...@bitdance.com wrote:
You, sir, should be programming in some language other than Python.
Why? - Python is object oriented, but I can write whole systems
without defining a single class.
By analogy, if data hiding is added to language, I could write a
whole system without hiding
You, sir, should be programming in some language other than Python.
Why? - Python is object oriented, but I can write whole systems
without defining a single class.
By analogy, if data hiding is added to language, I could write a
whole system without hiding a single item.
Conversely, the
r..@bi...nce.com wrote:
Quoth Hendrik van Rooyen m...@mi...orp.co.za:
Now there are a LOT of dicey statements in the above passionate
plea - python is a language, and not a philosophy, but I won't go
into that, as that would lead off onto a tangent, of which there have
been a
Hendrik:
I wonder why the designers of processors do such silly things as having
user and supervisor modes in the hardware - according to your
arguments a code review would solve the problem, and then they
could use the silicon saved to do other usefull stuff. - then any process
could
On Feb 2, 2:55 am, Stephen Hansen apt.shan...@gmail.com wrote:
This is proven
by your statement above, whereby you are driving a user away,
simply because the language, in one small aspect, does not
give him what he wants, and the tenor of this thread has been
very much: That's how it is
thmpsn@gmail.com a écrit :
On Feb 2, 2:55 am, Stephen Hansen apt.shan...@gmail.com wrote:
This is proven
by your statement above, whereby you are driving a user away,
simply because the language, in one small aspect, does not
give him what he wants, and the tenor of this thread has been
Quoth Hendrik van Rooyen m...@microcorp.co.za:
rd.mur...@bitdance.com wrote:
You, sir, should be programming in some language other than Python.
Why? - Python is object oriented, but I can write whole systems
without defining a single class.
By analogy, if data hiding is added to
that an underscore convention is
just as good, (It isn't),
Why isn't it?
Because it needs human intervention.
Not necessarily at all: that's something that could be checked very readily
with static analysis. Why isn't that a good enough tool if policy isn't
sufficient?
If you scan
Rhodri James a écrit :
On Sun, 01 Feb 2009 17:31:27 -, Steve Holden st...@holdenweb.com
wrote:
Stephen Hansen wrote:
[...]
don't play with anyone else's
privates.
A good rule in life as well as programming.
Unless, of course, you're both consenting adults.
What? Someone had to say
thmpsn@gmail.com a écrit :
(snip)
Anyway, it doesn't matter. We're losing the point here. The point is
that language support for private access, by disallowing user access
to private data, provides an unambiguous information hiding mechanism
which encourages encapsulation. Python's
On Feb 2, 9:02 am, thmpsn@gmail.com wrote:
On Feb 2, 2:55 am, Stephen Hansen apt.shan...@gmail.com wrote:
This is proven
by your statement above, whereby you are driving a user away,
simply because the language, in one small aspect, does not
give him what he wants, and the tenor
The reason is that I see a level of abstraction that makes it kind of
irrelevant whether something is run as a process, a thread, a time
multiplexed mainloop, on one or more processors, wherever or
whatever - almost like a fractal structure spread across the total
addressable space - and I
Stephen Hansen apt.shan...@gmail.com wrote:
8--- arguments for the status quo --
I'm missing the careful explanation. What I've heard is that the lack
of enforced encapsulation is a danger. What I've heard is that
people want it because they've been told they should want it and
I wonder why the designers of processors do such silly things as having
user and supervisor modes in the hardware - according to your
arguments a code review would solve the problem, and then they
could use the silicon saved to do other usefull stuff. - then any process
could use any
2009/2/2 Russ P. russ.paie...@gmail.com:
Are we supposed
to believe that the designers of C++, Java, Ada, and Scala are all
idiots?
No, we're supposed to believe that the designers of C++, Java, Ada,
and Scala are all designers of languages that are not Python. If all
languages had the same
On Monday 02 February 2009 04:51:11 pm Russ P. wrote:
As I said before, as an aeronautical engineer I don't know if enforced
access restriction can be added to Python without compromising or
unduly complicating the language. Maybe it can't. If that's the case,
then people should make that
Michael Torrie a écrit :
Steve Holden wrote:
You can think what you like, but there is a fundamental difference
between methods of a class and functions of a module. Until you
appreciate that you will likely make mistakes. Don't worry, though, we
all learn from our mistakes.
And this
rdmur...@bi..nce.com wrote:
Quoth Hendrik van Rooyen m...@microcorp.co.za:
rd.mur...@bitdance.com wrote:
You, sir, should be programming in some language other than Python.
8- reasons given
This is IMO an arrogant attitude -
My apologies!!
On Feb 2, 2:46 pm, Tim Rowe digi...@gmail.com wrote:
2009/2/2 Russ P. russ.paie...@gmail.com:
Are we supposed
to believe that the designers of C++, Java, Ada, and Scala are all
idiots?
No, we're supposed to believe that the designers of C++, Java, Ada,
and Scala are all designers of
Quoth Hendrik van Rooyen m...@microcorp.co.za:
Now there are a LOT of dicey statements in the above passionate
plea - python is a language, and not a philosophy, but I won't go
into that, as that would lead off onto a tangent, of which there have
been a surfeit in this thread.
Ah, now I
On Mon, Feb 2, 2009 at 4:51 PM, Russ P. russ.paie...@gmail.com wrote:
On Feb 2, 9:02 am, thmpsn@gmail.com wrote:
On Feb 2, 2:55 am, Stephen Hansen apt.shan...@gmail.com wrote:
This is proven
by your statement above, whereby you are driving a user away,
simply because the
2009/2/2 Russ P. russ.paie...@gmail.com:
On Feb 2, 2:46 pm, Tim Rowe digi...@gmail.com wrote:
No, we're supposed to believe that the designers of C++, Java, Ada,
and Scala are all designers of languages that are not Python. If all
languages had the same philosophy what would be the point of
On Mon, 02 Feb 2009 13:54:08 -, Hendrik van Rooyen
m...@microcorp.co.za wrote:
r..@bi...nce.com wrote:
PS: More accurately, Python _embodies_ a philosophy, and to advocate
changes that go against that philosophy is to advocate changing
Python into something that would no longer be
Russ P. russ.paie...@gmail.com writes:
I am not sure why people keep mentioning that Python is not Java.
As a slogan, it is rather misleading. Python is not C++, Ada, or Scala
either. All of those languages have enforced access restriction. Why
only mention Java?
Because Java is a well-known
On Feb 2, 4:35 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
This really, really, *really* isn't a tangent. It's the heart of
the matter. You are advocating a change that doesn't fit with
Python's consenting adults approach to programming. It's trivial
to enforce hiding using static
On 2009-02-02, Russ P. russ.paie...@gmail.com wrote:
I am not sure why people keep mentioning that Python is not
Java. As a slogan, it is rather misleading.
Because other people keep insisting that it ought to be.
Python is not C++, Ada, or Scala either. All of those
languages have enforced
On Tue, 03 Feb 2009 02:16:01 -, Russ P. russ.paie...@gmail.com wrote:
Here we go again. If you have access to the source code (as you nearly
always do with Python code), then breaking the language-enforced data
hiding is a trivial matter of deleting the word private (or
equivalent).
If
Quoting Russ P. russ.paie...@gmail.com:
I know ... changing one word constitutes a fork. Yeah, right.
Yeah, right.
You can't be bothered to change one word, but the library developer should
be required to litter his code with leading underscores everywhere,
No, instead they will have to
On Feb 2, 7:48 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 02:16:01 -, Russ P. russ.paie...@gmail.com wrote:
Here we go again. If you have access to the source code (as you nearly
always do with Python code), then breaking the language-enforced data
hiding is
On Tue, Feb 3, 2009 at 2:37 PM, Russ P. russ.paie...@gmail.com wrote:
On Feb 2, 7:48 pm, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Tue, 03 Feb 2009 02:16:01 -, Russ P. russ.paie...@gmail.com wrote:
Here we go again. If you have access to the source code (as you nearly
always do
On Sat, 31 Jan 2009 09:08:25 -0800, thmpsn.m.k wrote:
On Jan 30, 12:15 am, Chris Rebert c...@rebertia.com wrote:
- Python supports encapsulation. Prefixing an attribute/method with an
underscore indicates that other programmers should treat it as
'private'. However, unlike BD languages,
David Bolen wrote:
thmpsn@gmail.com writes:
I don't know how you would do it in C# (or Java for that matter).
In C++ you can play with pointers to get at some memory location
somewhere in the object. The only portable way to know the exact
location between the beginning of the object and
On Sat, Jan 31, 2009 at 9:08 AM, thmpsn@gmail.com wrote:
On Jan 30, 12:15 am, Chris Rebert c...@rebertia.com wrote:
- Python supports encapsulation. Prefixing an attribute/method with an
underscore indicates that other programmers should treat it as
'private'. However, unlike BD
On Feb 1, 1:50 am, Marc 'BlackJack' Rintsch bj_...@gmx.net wrote:
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
Anyway, it doesn't matter. We're losing the point here. The point is
that language support for private access, by disallowing user access
to private data, provides an unambiguous information hiding mechanism
which encourages encapsulation. Python's approach, however, which is
only a naming
Quoting thmpsn@gmail.com:
Or ``#define private public`` before including the header files. Which
doesn't look complicated to me.
Which again won't always work, if:
(a) the header defines another macro, say, PRIVATE, as private,
and uses PRIVATE to declare private members
[other
Stephen Hansen wrote:
[...]
don't play with anyone else's
privates.
A good rule in life as well as programming.
The *idea* of encapsulation is good in many cases, it is quite often a
solid design point and admirable goal. The *implementation* of enforced
data encapsulation brings no value
Quoth thmpsn@gmail.com:
Anyway, it doesn't matter. We're losing the point here. The point is
that language support for private access, by disallowing user access
to private data, provides an unambiguous information hiding mechanism
which encourages encapsulation. Python's approach,
On Sun, 01 Feb 2009 17:31:27 -, Steve Holden st...@holdenweb.com
wrote:
Stephen Hansen wrote:
[...]
don't play with anyone else's
privates.
A good rule in life as well as programming.
Unless, of course, you're both consenting adults.
What? Someone had to say it!
--
Rhodri James
On Sun, 01 Feb 2009 12:31:27 -0500, Steve Holden wrote:
I think it's noticeable that the people who have been arguing against
what I might tipify as this libertarian view are those for whom the
consequences of programming error are serious to extreme.
...
Just the same, it still doesn't save
On Sunday 01 February 2009 08:00:18 pm Steven D'Aprano wrote:
On Sun, 01 Feb 2009 12:31:27 -0500, Steve Holden wrote:
Except of course it isn't. Nobody sensibly complains that they can't
mangle the length of a list, or move keys around inside dicts, or
whatever. This data hiding is a good
Rhodri James wrote:
On Sun, 01 Feb 2009 17:31:27 -, Steve Holden st...@holdenweb.com
wrote:
Stephen Hansen wrote:
[...]
don't play with anyone else's
privates.
A good rule in life as well as programming.
Unless, of course, you're both consenting adults.
What? Someone had to
Steven D'Aprano wrote:
On Sun, 01 Feb 2009 12:31:27 -0500, Steve Holden wrote:
I think it's noticeable that the people who have been arguing against
what I might tipify as this libertarian view are those for whom the
consequences of programming error are serious to extreme.
...
Just the
On Feb 2, 4:10 am, Stephen Hansen apt.shan...@gmail.com wrote:
Anyway, it doesn't matter. We're losing the point here. The point is
that language support for private access, by disallowing user access
to private data, provides an unambiguous information hiding mechanism
which encourages
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
Re
‘builtin’ is not a class.
I think object ; not only class
And builtin is an object.
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
MC wrote:
Re
‘builtin’ is not a class.
I think object ; not only class
And builtin is an object.
You can think what you like, but there is a fundamental difference
between methods of a class and functions of a module. Until you
appreciate that you will likely make mistakes. Don't worry,
On Jan 30, 12:15 am, Chris Rebert c...@rebertia.com wrote:
- Python supports encapsulation. Prefixing an attribute/method with an
underscore indicates that other programmers should treat it as
'private'. However, unlike BD languages, Python itself does nothing
to enforce this privacy, leaving
On Sat, Jan 31, 2009 at 9:08 AM, thmpsn@gmail.com wrote:On Jan 30, 12:15am, Chris Rebert c...@rebertia.com wrote:
- Python supports encapsulation. Prefixing an attribute/method with an
underscore indicates that other programmers should treat it as
'private'. However, unlike BD
On Jan 30, 2:32 pm, Michael Torrie torr...@gmail.com wrote:
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
On Sat, 31 Jan 2009 09:11:03 +0100 Laszlo Nagy gand...@shopzeus.com
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
thmpsn@gmail.com schrieb:
But it's only a faking, and things such as inheritance and
polymorphism are implemented clumsily (actually I'm not even sure
about polymorphism). And of course, there are still no private
members.
Do you honestly believe that C++'s private members are really
thmpsn@gmail.com wrote
This allows people to meddle with internals, at their own risk,
if it ends up being absolutely necessary.
If it ends up being necessary, the class's design is flawed. (Though
in this case, the flaw is easily solved by simply providing a getter.)
No the class
thmpsn@gmail.com wrote:
To be clear, python does not force you to lay out your code according to
some strict object-oriented paradigm. But Python itself is still purely
object-oriented, as is your script when parsed.
But it's only a faking, and things such as inheritance and
Steve Holden wrote:
You can think what you like, but there is a fundamental difference
between methods of a class and functions of a module. Until you
appreciate that you will likely make mistakes. Don't worry, though, we
all learn from our mistakes.
And this fundamental difference is?
From
On Jan 31, 2:27 pm, Christian Heimes li...@cheimes.de wrote:
thmpsn@gmail.com schrieb:
But it's only a faking, and things such as inheritance and
polymorphism are implemented clumsily (actually I'm not even sure
about polymorphism). And of course, there are still no private
members.
thmpsn@gmail.com wrote:
More interestingly, though, most compilers translate C and C++ code to
assembler first. Does that mean that you can do object-oriented
programming, generic programming, and procedural programming in
assembler?
Answer: No, but you can probably -- very clumsily --
thmpsn@gmail.com writes:
I don't know how you would do it in C# (or Java for that matter).
In C++ you can play with pointers to get at some memory location
somewhere in the object. The only portable way to know the exact
location between the beginning of the object and the desired member
1 - 100 of 134 matches
Mail list logo