Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
future /
types /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
6.67
KB
-rw-r--r--
newbytes.py
15.92
KB
-rw-r--r--
newdict.py
3.03
KB
-rw-r--r--
newint.py
12.97
KB
-rw-r--r--
newlist.py
2.23
KB
-rw-r--r--
newmemoryview.py
712
B
-rw-r--r--
newobject.py
3.28
KB
-rw-r--r--
newopen.py
810
B
-rw-r--r--
newrange.py
5.17
KB
-rw-r--r--
newstr.py
15.39
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : newlist.py
""" 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']
Close