Re: overriding a property

2010-10-20 Thread Lucasm
On 20 Okt, 16:09, Peter Otten <__pete...@web.de> wrote: > Lucasm wrote: > > On 19 Okt, 18:28, Steven D'Aprano > cybersource.com.au> wrote: > >> On Tue, 19 Oct 2010 06:39:56 -0700, Lucasm wrote: > >> > Hi, > > >> > A question. Is it

Re: overriding a property

2010-10-20 Thread Lucasm
On 19 Okt, 18:28, Steven D'Aprano wrote: > On Tue, 19 Oct 2010 06:39:56 -0700, Lucasm wrote: > > Hi, > > > A question. Is it possible to dynamically override a property? > > > class A(object): > >     @property > >     def return_five(self): > >  

Re: overriding a property

2010-10-20 Thread Lucasm
On 19 Okt, 16:07, Benjamin Peterson wrote: > Lucasm gmail.com> writes: > > > I would like to override the property for an instance of A to say the > > string 'bla'. > > A.return_five = "blah" I guess you did not test that. :) -- http://mail.python.org/mailman/listinfo/python-list

overriding a property

2010-10-19 Thread Lucasm
Hi, A question. Is it possible to dynamically override a property? class A(object): @property def return_five(self): return 5 I would like to override the property for an instance of A to say the string 'bla'. -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorator question

2010-10-17 Thread Lucasm
On 16 Okt, 16:49, Peter Otten <__pete...@web.de> wrote: > Lucasm wrote: > > I have a decorator problem and hope someone is able to help me out/ > > assist me. Thanks in advance. > > > Suppose: > > ### Begin some_library_module ### > > > def some_dec

Re: asyncore.poll() question

2010-10-16 Thread Lucasm
On 16 Okt, 15:31, chad wrote: > At the following url.. > > http://www.nightmare.com/medusa/programming.html > > The author has the following code for a simple HTTP client > > #!/usr/bin/python > > import asyncore > import socket > import string > > class http_client (asyncore.dispatcher): > >    

Decorator question

2010-10-16 Thread Lucasm
Hello, I have a decorator problem and hope someone is able to help me out/ assist me. Thanks in advance. Suppose: ### Begin some_library_module ### def some_decorator(some_method): def inner(an_arg, *args, **kwargs): return some_method(an_arg, *args, **kwargs) return inner ### E