Picking out 3.3 function default values

This commit is contained in:
rocky
2018-03-04 18:40:08 -05:00
parent ffbce9cb77
commit 35fcb1edf1
3 changed files with 20 additions and 3 deletions

View File

@@ -4,3 +4,14 @@ def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
incrementalencoder=None, incrementaldecoder=None, name=None,
*, _is_text_encoding=None):
return
# From 3.3 _pyio.py. A closure is created here.
# This changes how the default params are found
class StringIO(object):
def __init__(self, initial_value="", newline="\n"):
super(StringIO, self).__init__()
# No closure created here
class StringIO2(object):
def __init__(self, initial_value="", newline="\n"):
return 5