Replaced type() comparison with cleaner isinstance
This commit is contained in:
1 parent
bb76792ea8
commit
0d6e2a5b70
1 file changed
+1
-1
+1
-1
@@ -68,7 +68,7 @@ def imitate_pydoc(string):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
get_target = lambda s: h.topics.get(s, h.keywords.get(s))
|
get_target = lambda s: h.topics.get(s, h.keywords.get(s))
|
||||||
while type(string) == type(''):
|
while isinstance(string, str):
|
||||||
string = get_target(string)
|
string = get_target(string)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in new issue
Block a user