On Tue, 29 May 2012 12:50:38 -0500
"Edward K. Ream" <[email protected]> wrote:

> Indeed, here is the context of the definition at line 306:
> 
>         for provider in splitter.root.providers:
>             if hasattr(provider, 'ns_provides'):
>                 for title, id_ in provider.ns_provides():
>                     def cb(id_=id_):
>                         splitter.open_window(action=id_)
                      self.add_item(cb, submenu, title)

You left out the last line, which I added again in the above.

I tried running pylint on this:

my_funcs = []
for i in range(5):
    def func(x=i):
        print (x)
    my_funcs.append(func)
for f in my_funcs:
    f()

which does NOT complain about redefinition of func.

I don't see a previous def'n in my code, although there are subsequent
definitions.  But it doesn't really matter, it's all valid, they're
callbacks, their name doesn't matter after they've been stored
wherever they belong.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to