Determine attributes of calling method

Ian Kelly ian.g.kelly at gmail.com
Sat Jun 4 16:02:27 EDT 2011


On Fri, Jun 3, 2011 at 2:35 PM, Joe <joe.cwikla at gmail.com> 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'



More information about the Python-list mailing list