mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
This commit is contained in:
parent
60d241f135
commit
3172c5d263
77 changed files with 171 additions and 217 deletions
|
@ -580,13 +580,13 @@ Common commands: (see '--help-commands' for more)
|
|||
|
||||
keywords = self.metadata.keywords
|
||||
if keywords is not None:
|
||||
if isinstance(keywords, basestring):
|
||||
if isinstance(keywords, str):
|
||||
keywordlist = keywords.split(',')
|
||||
self.metadata.keywords = [x.strip() for x in keywordlist]
|
||||
|
||||
platforms = self.metadata.platforms
|
||||
if platforms is not None:
|
||||
if isinstance(platforms, basestring):
|
||||
if isinstance(platforms, str):
|
||||
platformlist = platforms.split(',')
|
||||
self.metadata.platforms = [x.strip() for x in platformlist]
|
||||
|
||||
|
@ -874,7 +874,7 @@ Common commands: (see '--help-commands' for more)
|
|||
neg_opt = {}
|
||||
|
||||
try:
|
||||
is_string = isinstance(value, basestring)
|
||||
is_string = isinstance(value, str)
|
||||
if option in neg_opt and is_string:
|
||||
setattr(command_obj, neg_opt[option], not strtobool(value))
|
||||
elif option in bool_opts and is_string:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue