Mercurial > python-cmd2
changeset 340:43569db3ebdb
detect lists with __reversed__ not __getslice__
author | catherine@Drou |
---|---|
date | Tue, 16 Feb 2010 12:36:14 -0500 |
parents | 6c397f0865c7 |
children | 9e593c480782 |
files | cmd2.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd2.py Tue Feb 16 12:23:47 2010 -0500 +++ b/cmd2.py Tue Feb 16 12:36:14 2010 -0500 @@ -306,7 +306,7 @@ 'Generates dictionary from string or list of strings' if hasattr(arg, 'splitlines'): arg = arg.splitlines() - if hasattr(arg, '__getslice__'): + if hasattr(arg, '__reversed__'): result = {} for a in arg: a = a.strip()