diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-06-01 14:08:08 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-03-01 10:34:56 -0800 |
commit | 0dcb8ad0e829fddea92c5a76e2849e55617f7825 (patch) | |
tree | e77eb1fad21241bfde217175e3d9a33d5ce3b7ab /alot/ui.py | |
parent | 06972159673c16919ddaf19ee839387af6e69a51 (diff) |
repalces uses of dict.iter* with non-iter versions
in python3 dict.{keys,items,values} return views, which are similar to
iterators without some of the caveats about modifying the underlying
object. The iter* and view* methods have been removed, instead one warps
dict.x in iter or list to get those types.
Diffstat (limited to 'alot/ui.py')
-rw-r--r-- | alot/ui.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -529,9 +529,8 @@ class UI(object): :rtype: :class:`twisted.defer.Deferred` """ choices = choices or {'y': 'yes', 'n': 'no'} - choices_to_return = choices_to_return or {} - assert select is None or select in choices.itervalues() - assert cancel is None or cancel in choices.itervalues() + assert select is None or select in choices.values() + assert cancel is None or cancel in choices.values() assert msg_position in ['left', 'above'] d = defer.Deferred() # create return deferred |