# HG changeset patch # User catherine@Drou # Date 1266341774 18000 # Node ID 43569db3ebdb7b9a3eb01c9da2e1bb2b8a243aae # Parent 6c397f0865c79b1b96225551ffeffd7762000c27 detect lists with __reversed__ not __getslice__ diff -r 6c397f0865c7 -r 43569db3ebdb cmd2.py --- 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()