On Feb 12, 12:27 pm, TechieInsights wrote:
> Ok... for some closure I have written a class to automate the
> process. It takes getters and setters and deleters and then sets the
> property automatically. Sweet!
>
> class AutoProperty(type):
> def __new__(cls, name, bases, methoddict):
>
Ok... for some closure I have written a class to automate the
process. It takes getters and setters and deleters and then sets the
property automatically. Sweet!
class AutoProperty(type):
def __new__(cls, name, bases, methoddict):
processed = []
getter =
On Feb 12, 9:27 am, josh logan wrote:
> On Feb 12, 10:58 am, TechieInsights wrote:
>
>
>
> > Oh... one other thing that would be really cool is to do this with AOP/
> > descriptors! I just haven't been able to get that to work either.
> > Basics...
>
> > @readonly
> > class MyClass(object):
> >
On Feb 12, 10:58 am, TechieInsights wrote:
> Oh... one other thing that would be really cool is to do this with AOP/
> descriptors! I just haven't been able to get that to work either.
> Basics...
>
> @readonly
> class MyClass(object):
> def __init__(self, x):
> self.set_x
Oh... one other thing that would be really cool is to do this with AOP/
descriptors! I just haven't been able to get that to work either.
Basics...
@readonly
class MyClass(object):
def __init__(self, x):
self.set_x(x)
def get_x(self):
return self._