this is what I did to define all my color functions by color name, but I am
still going to need a good solution for args

        #import functions by color name into current namespace
>         for color in self.colors.keys():
>             setattr(self, color,lambda x,y=color,z="INFO":
> self._hero(x,y,z) )
>

Thanks to all of you for helping me learn python

-Alex Goretoy
http://www.goretoy.com



On Sun, Mar 15, 2009 at 1:05 PM, alex goretoy
<aleksandr.gore...@gmail.com>wrote:

> this means i have to check if d[i] is list or dict and iterate over
> properties
> -Alex Goretoy
> http://www.goretoy.com
>
>
>
> On Sun, Mar 15, 2009 at 1:03 PM, alex goretoy <aleksandr.gore...@gmail.com
> > wrote:
>
>> I will also actually need to nest it like so
>>
>> d={
>>    "site_name":["s","site",'
>>>
>>> sites','site_name','site_names'],
>>>    "jar_name":["j","jar",'jars','jar_name','jar_names'],
>>
>>     "options":{
>>         "src_name":["ss","src","source"],
>>         "mod_name":['m',"mod",'mods',"module","modules"],
>> }
>>
>> -Alex Goretoy
>> http://www.goretoy.com
>>
>>
>>
>> On Sun, Mar 15, 2009 at 10:51 AM, MRAB <goo...@mrabarnett.plus.com>wrote:
>>
>>> d={
>>>>    "site_name":["s","site",'sites','site_name','site_names'],
>>>>    "jar_name":["j","jar",'jars','jar_name','jar_names'],
>>>
>>>
>>
>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to