mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)
I suppose it is a remnants of very old code written when str, int, list, dict, etc were functions and not classes.
This commit is contained in:
parent
c826867b7c
commit
3680ebed7f
19 changed files with 41 additions and 39 deletions
|
@ -561,7 +561,7 @@ class FTP:
|
|||
LIST command. (This *should* only be used for a pathname.)'''
|
||||
cmd = 'LIST'
|
||||
func = None
|
||||
if args[-1:] and type(args[-1]) != type(''):
|
||||
if args[-1:] and not isinstance(args[-1], str):
|
||||
args, func = args[:-1], args[-1]
|
||||
for arg in args:
|
||||
if arg:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue