On Mar 7, 1:34 pm, [EMAIL PROTECTED] wrote:
> On Mar 7, 6:44 am, Sion Arrowsmith <[EMAIL PROTECTED]>
> wrote:
>
> > Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> > >En Thu, 06 Mar 2008 23:46:43 -0200, <[EMAIL PROTECTED]> escribi�:
> > >> [ ... ]
> > >You may look at the SimpleXMLRPCServer class
On Mar 7, 6:44 am, Sion Arrowsmith <[EMAIL PROTECTED]>
wrote:
> Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> >En Thu, 06 Mar 2008 23:46:43 -0200, <[EMAIL PROTECTED]> escribi�:
> >> [ ... ]
> >You may look at the SimpleXMLRPCServer class and see how it implements
> >introspection. It's rather
Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>En Thu, 06 Mar 2008 23:46:43 -0200, <[EMAIL PROTECTED]> escribi�:
>> [ ... ]
>You may look at the SimpleXMLRPCServer class and see how it implements
>introspection. It's rather easy (and doesn't require metaclasses nor
>decorators nor any other fa
En Thu, 06 Mar 2008 23:46:43 -0200, <[EMAIL PROTECTED]> escribi�:
> oss.message is a abstraction class that writes the method name into a
> string, then sends it to OSS... outgoingserver or serverside.
>
> Now that I'm writing it, and this is important, -to- the -newsgroup-,
> I realize you could
On Mar 6, 7:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Thu, 06 Mar 2008 22:56:33 -0200, <[EMAIL PROTECTED]> escribió:
>
> > On Mar 6, 5:35 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>
> >> p = P()
> >> print p.bar.func_name # -> bar
> >> p.bar.im_func.anotherattribute = 1
>
En Thu, 06 Mar 2008 22:56:33 -0200, <[EMAIL PROTECTED]> escribió:
> On Mar 6, 5:35 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>>
>> p = P()
>> print p.bar.func_name # -> bar
>> p.bar.im_func.anotherattribute = 1
>> print p.bar.anotherattribute # -> 1
>>
>> (the attribute must be set on the
On Mar 6, 5:35 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Wed, 05 Mar 2008 02:57:58 -0200, <[EMAIL PROTECTED]> escribi�:
>
>
>
>
>
> >> > > >> >> Can you overload -type-'s decision of what to 'bind'?...
> >> whenever it
> >> > > >> >> is it makes it.
>
> >> > > >> Use delegation inst
En Wed, 05 Mar 2008 02:57:58 -0200, <[EMAIL PROTECTED]> escribi�:
>> > > >> >> Can you overload -type-'s decision of what to 'bind'?...
>> whenever it
>> > > >> >> is it makes it.
>>
>> > > >> Use delegation instead of inheritance. This class is almost
>> > > >> indistinguishable from a true f
On Mar 4, 10:57 pm, [EMAIL PROTECTED] wrote:
> > > > >> >> Can you overload -type-'s decision of what to 'bind'?... whenever
> > > > >> >> it
> > > > >> >> is it makes it.
>
> > > > >> from types import FunctionType, MethodType
> > > > >> class A( FunctionType ): pass
> > > > >> > ...
>
> > > >> >> Can you overload -type-'s decision of what to 'bind'?... whenever it
> > > >> >> is it makes it.
>
> > > >> from types import FunctionType, MethodType
> > > >> class A( FunctionType ): pass
> > > >> > ...
> > > >> > Traceback (most recent call last):
> > > >> > File "", line
On Mar 4, 9:53 pm, [EMAIL PROTECTED] wrote:
> > >> >> Can you overload -type-'s decision of what to 'bind'?... whenever it
> > >> >> is it makes it.
>
> > >> from types import FunctionType, MethodType
> > >> class A( FunctionType ): pass
> > >> > ...
> > >> > Traceback (most recent call l
On Mar 4, 9:01 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Wed, 05 Mar 2008 00:30:26 -0200, <[EMAIL PROTECTED]> escribió:
>
> > On Mar 4, 8:11 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> >> En Tue, 04 Mar 2008 16:45:40 -0200, <[EMAIL PROTECTED]> escribió:
>
> >> >> Can you over
En Wed, 05 Mar 2008 00:30:26 -0200, <[EMAIL PROTECTED]> escribió:
> On Mar 4, 8:11 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>> En Tue, 04 Mar 2008 16:45:40 -0200, <[EMAIL PROTECTED]> escribió:
>>
>> >> Can you overload -type-'s decision of what to 'bind'?... whenever it
>> >> is it makes
On Mar 4, 8:11 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 04 Mar 2008 16:45:40 -0200, <[EMAIL PROTECTED]> escribió:
>
> >> > So, to answer your question: what you are decorating are functions,
> >> not
> >> > methods.
>
> >> Can you overload -type-'s decision of what to 'bind'?.
En Tue, 04 Mar 2008 16:45:40 -0200, <[EMAIL PROTECTED]> escribió:
>> > So, to answer your question: what you are decorating are functions,
>> not
>> > methods.
>>
>> Can you overload -type-'s decision of what to 'bind'?... whenever it
>> is it makes it.
>
from types import FunctionType, Met
> > So, to answer your question: what you are decorating are functions, not
> > methods.
>
> Can you overload -type-'s decision of what to 'bind'?... whenever it
> is it makes it.
>>> from types import FunctionType, MethodType
>>> class A( FunctionType ): pass
...
Traceback (most recent call last)
On Mar 4, 5:27 am, Bruno Desthuilliers wrote:
> ?? a écrit :
>
> > Howdy everyone,
>
> > This is a big problem puzzles me for a long time. The core question is:
> > How to dynamically create methods on a class or an instance?
>
> class Foo(object):
> pass
>
> def bar(self, arg):
> pri
?? a écrit :
> Howdy everyone,
>
> This is a big problem puzzles me for a long time. The core question is:
> How to dynamically create methods on a class or an instance?
class Foo(object):
pass
def bar(self, arg):
print "in bar : self == % - arg == %s" % (self, str(arg))
def baaz(s
On 4 Mar, 09:22, "甜瓜" <[EMAIL PROTECTED]> wrote:
>
> This is a big problem puzzles me for a long time. The core question is:
> How to dynamically create methods on a class or an instance?
>
> Let me state it step by step.
> 1.
> def gunc(self):
> pass
> class A(object):
> def func(self
Howdy everyone,
This is a big problem puzzles me for a long time. The core question is:
How to dynamically create methods on a class or an instance?
Let me state it step by step.
1.
def gunc(self):
pass
class A(object):
def func(self):
pass
a = A()
a.func # gives "bound met
20 matches
Mail list logo