REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.72 KB
Close
//proc/thread-self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/future/builtins/new_min_max.py
Text
Base64
import itertools from future import utils if utils.PY2: from __builtin__ import max as _builtin_max, min as _builtin_min else: from builtins import max as _builtin_max, min as _builtin_min _SENTINEL = object() def newmin(*args, **kwargs): return new_min_max(_builtin_min, *args, **kwargs) def newmax(*args, **kwargs): return new_min_max(_builtin_max, *args, **kwargs) def new_min_max(_builtin_func, *args, **kwargs): """ To support the argument "default" introduced in python 3.4 for min and max :param _builtin_func: builtin min or builtin max :param args: :param kwargs: :return: returns the min or max based on the arguments passed """ for key, _ in kwargs.items(): if key not in set(['key', 'default']): raise TypeError('Illegal argument %s', key) if len(args) == 0: raise TypeError if len(args) != 1 and kwargs.get('default', _SENTINEL) is not _SENTINEL: raise TypeError if len(args) == 1: iterator = iter(args[0]) try: first = next(iterator) except StopIteration: if kwargs.get('default', _SENTINEL) is not _SENTINEL: return kwargs.get('default') else: raise ValueError('{}() arg is an empty sequence'.format(_builtin_func.__name__)) else: iterator = itertools.chain([first], iterator) if kwargs.get('key') is not None: return _builtin_func(iterator, key=kwargs.get('key')) else: return _builtin_func(iterator) if len(args) > 1: if kwargs.get('key') is not None: return _builtin_func(args, key=kwargs.get('key')) else: return _builtin_func(args)
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2026-02-06 08:01:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
disabled.py
2.06 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
iterators.py
1.36 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
misc.py
4.44 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
newnext.py
1.96 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
newround.py
3.12 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
newsuper.py
3.76 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
new_min_max.py
1.72 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
1.65 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).