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
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
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 output is:
blue
red
bar
bar
I'd like it to b