Re: Property with Arguments

2008-01-11 Thread Lie
On Jan 11, 6:20 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Lie wrote: > > Is there a way to create a property with arguments? > > That's called method in Python, and has it's own syntax.  You cannot > assign to methods. So you've got to use methods

Re: Property with Arguments

2008-01-11 Thread Fredrik Lundh
Lie wrote: > Is there a way to create a property with arguments? That's called method in Python, and has it's own syntax. You cannot assign to methods. > Or an index value like a list? Make the property that returns a list-like object (hooking __getitem__, __setitem__, e

Property with Arguments

2008-01-11 Thread Lie
Is there a way to create a property with arguments? Or an index value like a list? To be used in the form like: someClass.someProperty['arguments'] = 'some value' or someClass.someProperty('argument1', 'argument2') = 'some value' -- http://mail.python.org/mailman/listinfo/python-list