diff options
Diffstat (limited to 'Lib/shlex.py')
-rw-r--r-- | Lib/shlex.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/shlex.py b/Lib/shlex.py index 70feb89..55db23c 100644 --- a/Lib/shlex.py +++ b/Lib/shlex.py @@ -18,7 +18,7 @@ __all__ = ["shlex", "split"] class shlex: "A lexical analyzer class for simple shell-like syntaxes." def __init__(self, instream=None, infile=None, posix=False): - if isinstance(instream, basestring): + if isinstance(instream, str): instream = StringIO(instream) if instream is not None: self.instream = instream @@ -61,7 +61,7 @@ class shlex: def push_source(self, newstream, newfile=None): "Push an input source onto the lexer's input source stack." - if isinstance(newstream, basestring): + if isinstance(newstream, str): newstream = StringIO(newstream) self.filestack.appendleft((self.infile, self.instream, self.lineno)) self.infile = newfile @@ -247,7 +247,7 @@ class shlex: if newfile[0] == '"': newfile = newfile[1:-1] # This implements cpp-like semantics for relative-path inclusion. - if isinstance(self.infile, basestring) and not os.path.isabs(newfile): + if isinstance(self.infile, str) and not os.path.isabs(newfile): newfile = os.path.join(os.path.dirname(self.infile), newfile) return (newfile, open(newfile, "r")) |