Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
bruno at modulix [EMAIL PROTECTED] wrote:
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
bruno at modulix [EMAIL PROTECTED] wrote:
Lawrence D'Oliveiro wrote:
(snip)
I think you're taking Python's OO-ness too
In [EMAIL PROTECTED], Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Nope. I mean : they don't overuse OO, they overuse *classes*. AFAIK, OO
means *object* oriented - not class oriented.
Oh great. Now we have someone redefining the
In article [EMAIL PROTECTED],
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Sandra-24 a écrit :
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
Sandra-24 [EMAIL PROTECTED] wrote:
Now that is a clever little trick. I never would have guessed you can
assign to __class__, Python
In article [EMAIL PROTECTED],
bruno at modulix [EMAIL PROTECTED] wrote:
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
bruno at modulix [EMAIL PROTECTED] wrote:
Lawrence D'Oliveiro wrote:
(snip)
I think you're taking Python's OO-ness too seriously. One of the
strengths of
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Sandra-24 a écrit :
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
Sandra-24 [EMAIL PROTECTED] wrote:
Now that is a clever little trick. I never would have guessed you can
In article [EMAIL PROTECTED],
bruno at modulix [EMAIL PROTECTED] wrote:
Lawrence D'Oliveiro wrote:
(snip)
I think you're taking Python's OO-ness too seriously. One of the
strengths of Python is that it can _look_ like an OO language without
actually being OO.
According to which definition
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
bruno at modulix [EMAIL PROTECTED] wrote:
Lawrence D'Oliveiro wrote:
(snip)
I think you're taking Python's OO-ness too seriously. One of the
strengths of Python is that it can _look_ like an OO language without
actually being OO.
Lawrence D'Oliveiro wrote:
(snip)
I think you're taking Python's OO-ness too seriously. One of the
strengths of Python is that it can _look_ like an OO language without
actually being OO.
According to which definition of OO ?
--
bruno desthuilliers
python -c print
Lawrence D'Oliveiro wrote:
All you want is a dictionary, then. That's basically what Python objects
are.
Yes, that's it exactly. I made a lazy wrapper for it, and I was really
happy with what I was able to accomplish, it turned out to be very
easy.
Thanks,
-Sandra
--
Sandra-24 a écrit :
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
Sandra-24 [EMAIL PROTECTED] wrote:
Now that is a clever little trick. I never would have guessed you can
assign to __class__, Python always surprises me in it's sheer
flexibility.
That's because you're still
Sandra-24 wrote:
Now that is a clever little trick. I never would have guessed you can
assign to __class__, Python always surprises me in it's sheer
flexibility.
In this case it doesn't work.
TypeError: __class__ assignment: only for heap types
I suspect that's because this object
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
Sandra-24 [EMAIL PROTECTED] wrote:
Now that is a clever little trick. I never would have guessed you can
assign to __class__, Python always surprises me in it's sheer
flexibility.
That's because you're still thinking in OO terms.
In article [EMAIL PROTECTED],
Sandra-24 [EMAIL PROTECTED] wrote:
However in this case I'm simply getting an object (an mp_request object
from mod_python) passed into my function, and before I pass it on to
the functions that make up and individual web page it is modified by
adding members and
Sandra-24 wrote:
Can you create an instance of a subclass using an existing instance of
the base class?
Such things would be impossible in some languages or very difficult in
others. I wonder if this can be done in python, without copying the
base class instance, which in my case is a very
Now that is a clever little trick. I never would have guessed you can
assign to __class__, Python always surprises me in it's sheer
flexibility.
In this case it doesn't work.
TypeError: __class__ assignment: only for heap types
I suspect that's because this object begins its life in C code.
In article [EMAIL PROTECTED],
Sandra-24 [EMAIL PROTECTED] wrote:
Now that is a clever little trick. I never would have guessed you can
assign to __class__, Python always surprises me in it's sheer
flexibility.
That's because you're still thinking in OO terms.
--
Can you create an instance of a subclass using an existing instance of
the base class?
Such things would be impossible in some languages or very difficult in
others. I wonder if this can be done in python, without copying the
base class instance, which in my case is a very expensive object.
Any
In article [EMAIL PROTECTED],
Sandra-24 [EMAIL PROTECTED] wrote:
Can you create an instance of a subclass using an existing instance of
the base class?
I think you're taking Python's OO-ness too seriously. One of the
strengths of Python is that it can _look_ like an OO language without
With new-style classes you can find out a class' subclasses and then
you can instantiate the subclass you want. Suppose you have two classes
A and B, B is a subclass of A, A is a new-style class. Now you have an
A's instance called a, to instance B you can do the following:
b =
19 matches
Mail list logo