Code review comment for lp:~frankban/juju-quickstart/env-manage-base-views

Revision history for this message
Gary Poster (gary) wrote :

Ran out of time, but I think this looks great. Count me as an LGTM
'cause I know bac will do a great review. :-)

https://codereview.appspot.com/42600044/diff/1/quickstart/cli/ui.py
File quickstart/cli/ui.py (right):

https://codereview.appspot.com/42600044/diff/1/quickstart/cli/ui.py#newcode28
quickstart/cli/ui.py:28: # Define the color palette used by the Urwid
application.
Might be nice to describe the columns. I assume they are class name (or
None for default), text style, background style.

https://codereview.appspot.com/42600044/diff/1/quickstart/cli/ui.py#newcode70
quickstart/cli/ui.py:70: def bind(function, *args):
Huh. So...this effectively produces a thunk that discards/ignores the
argument. You could call it that, I guess. This functionality is
really generic. If you didn't need to discard the argument, you could
just use functools.partial.

def make_aggressive_thunk(function, *args, **kwargs):
     def thunk(*ignored, **ignored_kwargs):
         return function(*args, **kwargs)
     return thunk

<shrug> :-)

https://codereview.appspot.com/42600044/

« Back to merge proposal