On Sat, 13 Mar 2010 11:02:44 -0800, Jon Clements wrote:
> If I can re-explain slightly, say I have a class 'compute':
>
> class Compute(object):
> def __init__(self, something):
> self.something = something
> # misc other methods here.
>
> then...
>
> class ComputeAdd(Comput
On 13 Mar, 17:42, Jack Diederich wrote:
> On Sat, Mar 13, 2010 at 12:10 PM, Jon Clements wrote:
> > On 13 Mar, 16:42, Jack Diederich wrote:
> >> On Sat, Mar 13, 2010 at 11:19 AM, Jon Clements
> >> wrote:
> >> > This is semi-experimental and I'd appreciate opinions of whether it's
> >> > the co
On Sat, Mar 13, 2010 at 8:19 AM, Jon Clements wrote:
> The name 'some_function' is completely redundant -- don't need it,
> don't actually care about the function afterwards, as long as it
> becomes a __call__ of a 'B' *instance*.
>
Special methods are looked up on the class, not the instance, s
On Sat, Mar 13, 2010 at 12:10 PM, Jon Clements wrote:
> On 13 Mar, 16:42, Jack Diederich wrote:
>> On Sat, Mar 13, 2010 at 11:19 AM, Jon Clements wrote:
>> > This is semi-experimental and I'd appreciate opinions of whether it's
>> > the correct design approach or not. It seems like a good idea,
On 13 Mar, 16:42, Jack Diederich wrote:
> On Sat, Mar 13, 2010 at 11:19 AM, Jon Clements wrote:
> > This is semi-experimental and I'd appreciate opinions of whether it's
> > the correct design approach or not. It seems like a good idea, but it
> > doesn't mean it is.
>
> > I have a class 'A', thi
On Mar 13, 10:38 am, Jon Clements wrote:
> On 13 Mar, 16:26, Patrick Maupin wrote:
>
>
>
> > On Mar 13, 10:19 am, Jon Clements wrote:
>
> > > What I'd like to achieve is something similar to:
>
> > > @inject(B):
> > > def some_function(a, b):
> > > pass # something useful
>
> > So, just ty
On Sat, Mar 13, 2010 at 11:19 AM, Jon Clements wrote:
> This is semi-experimental and I'd appreciate opinions of whether it's
> the correct design approach or not. It seems like a good idea, but it
> doesn't mean it is.
>
> I have a class 'A', this provides standard support functions and
> excepti
On 13 Mar, 16:26, Patrick Maupin wrote:
> On Mar 13, 10:19 am, Jon Clements wrote:
>
> > What I'd like to achieve is something similar to:
>
> > @inject(B):
> > def some_function(a, b):
> > pass # something useful
>
> So, just typing at the keyboard here, you mean something like:
>
> class
On Mar 13, 10:19 am, Jon Clements wrote:
> What I'd like to achieve is something similar to:
>
> @inject(B):
> def some_function(a, b):
> pass # something useful
So, just typing at the keyboard here, you mean something like:
class InjectClass(object):
def __init__(self, func, *args, *
This is semi-experimental and I'd appreciate opinions of whether it's
the correct design approach or not. It seems like a good idea, but it
doesn't mean it is.
I have a class 'A', this provides standard support functions and
exception handling.
I have 'B' and 'C' which specialise upon 'A'
What I'
10 matches
Mail list logo