diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-06-17 19:55:33 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-06-17 20:09:53 +0200 |
commit | 8d77df7c0e116e4cd1f6aa38f00b856571327d49 (patch) | |
tree | c1e7422b5688a7657d857b3457ee64925aac6a27 /utils.py | |
parent | d3cf5ae82f04f221792c25f36a1a204c08965b08 (diff) | |
download | clufter-8d77df7c0e116e4cd1f6aa38f00b856571327d49.tar.gz clufter-8d77df7c0e116e4cd1f6aa38f00b856571327d49.tar.xz clufter-8d77df7c0e116e4cd1f6aa38f00b856571327d49.zip |
command_context: restore common dict semantics + allow "bypass"
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -46,9 +46,13 @@ filterdict_invpop = \ # -# function introspection related +# introspection related # +def isinstanceexcept(subj, obj, exc=()): + return isinstance(subj, obj) and not isinstance(subj, exc) + + def func_defaults_varnames(func, skip=0): """Using introspection, get arg defaults (dict) + all arg names (tuple) |