Re: Determine attributes of calling method

2011-06-04 Thread Ian Kelly
On Fri, Jun 3, 2011 at 2:35 PM, Joe wrote: >    foo.__dict__['color']='blue' >    fu.__dict__['color']='red' You don't need to use __dict__ to set function attributes. Just do: foo.color = 'blue' -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine attributes of calling method

2011-06-04 Thread Richard Thomas
On Jun 3, 9:35 pm, Joe wrote: > Hello, > > I'm trying to implement a way to restrict method usage based on the > caller's attributes.  In the following example I'd like to execute the > server method "bar" only if the caller's method has a "blue" value for > it's color attribute. > > The current o