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
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 re
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
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.
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
>>>
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
>
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 whic
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
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
--
http://mail.python.o
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 '@'.join(['.'.join([w[
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 membe
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
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 ob
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.
--
http://mail.python.org/
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.
The
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
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 = a.__class__.__sub
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
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 i
19 matches
Mail list logo