3.2 mk_func tweak...

...more is needed though
This commit is contained in:
rocky
2018-04-03 17:57:37 -04:00
parent e2dec73a62
commit e9c0d03b8b
2 changed files with 6 additions and 1 deletions

View File

@@ -63,3 +63,8 @@ def unpack_archive(func, filename, dict, format_info, extract_dir=None):
import xdrlib import xdrlib
def assertRaisesConversion(self, *args): def assertRaisesConversion(self, *args):
self.assertRaises(xdrlib.ConversionError, *args) self.assertRaises(xdrlib.ConversionError, *args)
# From 3.2.6 _pyio.py
class BlockingIOError(IOError):
def __init__(self, errno, strerror, characters_written=5):
super().__init__(errno, strerror)

View File

@@ -520,7 +520,7 @@ def make_function3(self, node, is_lambda, nested=1, codeNode=None):
lc_index = -3 lc_index = -3
pass pass
if (self.version <= 3.3 and len(node) > 2 and if (self.version == 3.3 and len(node) > 2 and
node[lambda_index] != 'LOAD_LAMBDA' and node[lambda_index] != 'LOAD_LAMBDA' and
(have_kwargs or node[lc_index].kind != 'load_closure')): (have_kwargs or node[lc_index].kind != 'load_closure')):
# args are after kwargs; kwargs are bundled as one node # args are after kwargs; kwargs are bundled as one node