ian at excess.org
Thu Sep 15 09:52:04 EDT 2011
On 09/15/2011 06:43 AM, Alain Leufroy wrote:
> Hi everyone,
> I found something strange with `urwid.command_map`.
> It's a module given by the file *urwid/command_map.py*
> and it is also an instance of `urwid.command_map.Command_map`.
> This introduce a problem with lazy import systems (or lazy import introduce
> the problem :D), mercurial for instance.
Interesting. I haven't played with lazy importing much, except for what
django does. What exactly causes the problem?
> Does this behaviour is really needed ?
Well it's been that way for a few releases, so changing it will break
some people's code.
But that reminds me that there is a longstanding request to move that
instance to the Widget base class and update the standard widgets usage.
Then there is a clear way to override commands for instances, widget
subclasses classes or globally.
More information about the Urwid