Nathan Harmston a écrit :
> Hi,
>
> I guess my description was a bit rubbish in retrospec, I dont even
> think the title of my email made senseit doesnt to me now:
>
> class Manager(object):
> def __init__(self):
> pass
> def dosomething(self):
> return "RESULTS"
>
> class Foo(ob
Hi,
I guess my description was a bit rubbish in retrospec, I dont even
think the title of my email made senseit doesnt to me now:
class Manager(object):
def __init__(self):
pass
def dosomething(self):
return "RESULTS"
class Foo(object):
def __init__(self):
self.a = "NEE"
W
Nathan Harmston a écrit :
> HI,
>
> I m trying to start an api in a similar way to the djangic way of
> Class.objects.all(). Ie objects is a "Manager" class.
>
> So:
>
> class Foo(object):
>def __init__(self):
> self.test = "NEE"
>
> class Manager(object):
> def __init__(self):
James Stroud wrote:
> Nathan Harmston wrote:
>> And also preventing more than one Manager instance instantiated at one
>> time.
>
> Forgot to answer this. You want the singleton pattern:
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52558
But not really a singleton now that I think
Nathan Harmston wrote:
> And also preventing more than one Manager instance instantiated at one
> time.
Forgot to answer this. You want the singleton pattern:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52558
James
--
http://mail.python.org/mailman/listinfo/python-list
Nathan Harmston wrote:
> HI,
>
> I m trying to start an api in a similar way to the djangic way of
> Class.objects.all(). Ie objects is a "Manager" class.
>
> So:
>
> class Foo(object):
>def __init__(self):
> self.test = "NEE"
>
> class Manager(object):
> def __init__(self):
>
On Sep 17, 1:14 am, "Nathan Harmston" <[EMAIL PROTECTED]>
wrote:
> HI,
>
> I m trying to start an api in a similar way to the djangic way of
> Class.objects.all(). Ie objects is a "Manager" class.
>
> So:
>
> class Foo(object):
>def __init__(self):
> self.test = "NEE"
>
> class Manager(
HI,
I m trying to start an api in a similar way to the djangic way of
Class.objects.all(). Ie objects is a "Manager" class.
So:
class Foo(object):
def __init__(self):
self.test = "NEE"
class Manager(object):
def __init__(self):
pass
def all(self):
return "COCONU