On 6/6/14, Ben Finney b...@benfinney.id.au wrote:
Dan Stromberg drsali...@gmail.com writes:
Is there a way of decorating method1 of class C using method2 of class
C?
Can you give a concrete example (i.e. not merely hypothetical) where
this would be a useful feature (i.e. an actual
On Mon, Jun 9, 2014 at 4:04 AM, Dan Stromberg drsali...@gmail.com wrote:
I have a class that's operating on a socket.
I'd like to have simple operations on that socket like list
configured hosts, allow connection to host, etc. And I'd like them
to be decorated with
Dan Stromberg drsali...@gmail.com writes:
I'd like to have simple operations on that socket like list
configured hosts, allow connection to host, etc. And I'd like them
to be decorated with reconnected_to_server_if_needed.
The ‘reconnected_to_server_if_needed’ method, if I understand
your
Is there a way of decorating method1 of class C using method2 of class C?
It seems like there's a chicken-and-the-egg problem; the class doesn't
seem to know what self is until later in execution so there's
apparently no way to specify @self.method2 when def'ing method1.
--
On Sat, Jun 7, 2014 at 10:14 AM, Dan Stromberg drsali...@gmail.com wrote:
Is there a way of decorating method1 of class C using method2 of class C?
It seems like there's a chicken-and-the-egg problem; the class doesn't
seem to know what self is until later in execution so there's
apparently
Dan Stromberg drsali...@gmail.com writes:
Is there a way of decorating method1 of class C using method2 of class
C?
Can you give a concrete example (i.e. not merely hypothetical) where
this would be a useful feature (i.e. an actual improvement over the
absence of the feature), and why?
It
On 6/6/2014 8:14 PM, Dan Stromberg wrote:
Is there a way of decorating method1 of class C using method2 of class C?
It seems like there's a chicken-and-the-egg problem; the class doesn't
seem to know what self is until later in execution so there's
apparently no way to specify @self.method2
On Fri, 06 Jun 2014 17:14:54 -0700, Dan Stromberg wrote:
Is there a way of decorating method1 of class C using method2 of class
C?
Yes. See below.
It seems like there's a chicken-and-the-egg problem; the class doesn't
seem to know what self is until later in execution so there's
apparently