Commit 331f19e8 authored by Guido van Rossum's avatar Guido van Rossum

Change two occurrences of type(x) <> types.CodeType into

isinstance(x, types.CodeType).

Suggested by Finn Bock.
parent fca049d9
...@@ -339,7 +339,7 @@ class Bdb: ...@@ -339,7 +339,7 @@ class Bdb:
locals = globals locals = globals
self.reset() self.reset()
sys.settrace(self.trace_dispatch) sys.settrace(self.trace_dispatch)
if type(cmd) <> types.CodeType: if not isinstance(cmd, types.CodeType):
cmd = cmd+'\n' cmd = cmd+'\n'
try: try:
try: try:
...@@ -358,7 +358,7 @@ class Bdb: ...@@ -358,7 +358,7 @@ class Bdb:
locals = globals locals = globals
self.reset() self.reset()
sys.settrace(self.trace_dispatch) sys.settrace(self.trace_dispatch)
if type(expr) <> types.CodeType: if not isinstance(expr, types.CodeType):
expr = expr+'\n' expr = expr+'\n'
try: try:
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment