Merge branch 'master' into python-2.4

This commit is contained in:
rocky
2018-06-11 11:38:19 -04:00
2 changed files with 7 additions and 8 deletions

View File

@@ -68,11 +68,9 @@ def usage():
def main_bin(): def main_bin():
if not (sys.version_info[0:2] in ((2, 4), (2, 5), (2, 6), (2, 7), if not (sys.version_info[0:2] in ((2, 4), (2, 5), (2, 6), (2, 7)):
(3, 2), (3, 3), sys.stderr.write('Error: this branch of %s requires Python 2.4, 2.5, 2.6 or 2.7'
(3, 4), (3, 5), (3, 6), (3, 7))): % program)
sys.stderr.write('Error: %s requires Python 2.4 2.5 2.6, 2.7, '
'3.2, 3.3, 3.4, 3.5, or 3.6' % program)
sys.exit(-1) sys.exit(-1)
do_verify = recurse_dirs = False do_verify = recurse_dirs = False

View File

@@ -595,8 +595,9 @@ def make_function3(self, node, is_lambda, nested=1, code_node=None):
paramnames = list(scanner_code.co_varnames[:argc]) paramnames = list(scanner_code.co_varnames[:argc])
# defaults are for last n parameters, thus reverse # defaults are for last n parameters, thus reverse
if not 3.0 == self.version or self.version >= 3.6: if self.version < 3.6:
paramnames.reverse(); defparams.reverse() paramnames.reverse();
defparams.reverse()
try: try:
ast = self.build_ast(scanner_code._tokens, ast = self.build_ast(scanner_code._tokens,
@@ -625,7 +626,7 @@ def make_function3(self, node, is_lambda, nested=1, code_node=None):
else: else:
params = paramnames params = paramnames
if not 3.0 == self.version or self.version >= 3.6: if not 3.1 <= self.version < 3.6:
params.reverse() # back to correct order params.reverse() # back to correct order
if code_has_star_arg(code): if code_has_star_arg(code):