On Thu, May 14, 2015 at 5:04 AM, <reinhard.engel...@googlemail.com> wrote:

> So it looks like we're stuck.  Any ideas?
>>
>
> Apart from using a sophisticated decorator you could just pass the class
> name as an optional parameter in
>
> @cmd(command_name, class_name=None)
>
> I'm no expert here, but this would require about 150 changes in the Leo
> code base and could be done
> ​ ​
> by a regex  search/replace.
>

​I'd rather stick to per-class decorators rather than add the class name.
It's too ugly. This would be the *worst *kind of complexity: something that
complicates all uses of the decorator.

In contrast, your sophisticated decorator completely encapsulates all the
complexity.  This is the *best *kind of complexity: something that
simplifies the uses of the decorator.

Being able to use g.command everywhere will be a big win.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to