Re: overriding a property

2010-10-20 Thread Lucasm
On 19 Okt, 16:07, Benjamin Peterson benja...@python.org wrote: Lucasm lordlucraft at 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

Re: overriding a property

2010-10-20 Thread Lucasm
On 19 Okt, 18:28, Steven D'Aprano st...@remove-this- cybersource.com.au 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):         return 5 I would

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 st...@remove-this- cybersource.com.au 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

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_decorator(some_method):     def inner(an_arg, *args, **kwargs

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 ###

Re: asyncore.poll() question

2010-10-16 Thread Lucasm
On 16 Okt, 15:31, chad cdal...@gmail.com 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):