From a5bb138a62353daec38a3a5536cd42de7f29e459 2012-09-27 19:59:45 From: Bradley M. Froehle Date: 2012-09-27 19:59:45 Subject: [PATCH] `sys.maxsize` is the maximum length of a container. From the Python documentation: > sys.maxsize: > The largest positive integer supported by the platform's > Py_ssize_t type, and thus the maximum size lists, strings, > dicts, and many other containers can have. --- diff --git a/IPython/utils/traitlets.py b/IPython/utils/traitlets.py index cd08d4b..c45d717 100644 --- a/IPython/utils/traitlets.py +++ b/IPython/utils/traitlets.py @@ -1225,7 +1225,7 @@ class List(Container): """An instance of a Python list.""" klass = list - def __init__(self, trait=None, default_value=None, minlen=0, maxlen=sys.maxint, + def __init__(self, trait=None, default_value=None, minlen=0, maxlen=sys.maxsize, allow_none=True, **metadata): """Create a List trait type from a list, set, or tuple. @@ -1254,7 +1254,7 @@ class List(Container): minlen : Int [ default 0 ] The minimum length of the input list - maxlen : Int [ default sys.maxint ] + maxlen : Int [ default sys.maxsize ] The maximum length of the input list allow_none : Bool [ default True ]