diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2005-11-25 03:17:59 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2005-11-25 03:17:59 (GMT) |
commit | d752f7d8e851eb6160bbb1bb0e506652ec037f10 (patch) | |
tree | a31a2bd153f529be28c4172602d6f5abebf76f31 /Lib/compiler/misc.py | |
parent | f9232678aede501ea6cde3bbbcb08de068c16153 (diff) | |
download | cpython-d752f7d8e851eb6160bbb1bb0e506652ec037f10.zip cpython-d752f7d8e851eb6160bbb1bb0e506652ec037f10.tar.gz cpython-d752f7d8e851eb6160bbb1bb0e506652ec037f10.tar.bz2 |
No need for types, use isinstance
Diffstat (limited to 'Lib/compiler/misc.py')
-rw-r--r-- | Lib/compiler/misc.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/compiler/misc.py b/Lib/compiler/misc.py index 6d5eaa8..8d91770 100644 --- a/Lib/compiler/misc.py +++ b/Lib/compiler/misc.py @@ -1,9 +1,8 @@ -import types def flatten(tup): elts = [] for elt in tup: - if type(elt) == types.TupleType: + if isinstance(elt, tuple): elts = elts + flatten(elt) else: elts.append(elt) |