$98 GRAYBYTE WORDPRESS FILE MANAGER $99

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib64/python3.12/asyncio/

HOME
Current File : /usr/lib64/python3.12/asyncio//base_futures.py
__all__ = ()

import reprlib

from . import format_helpers

# States for Future.
_PENDING = 'PENDING'
_CANCELLED = 'CANCELLED'
_FINISHED = 'FINISHED'


def isfuture(obj):
    """Check for a Future.

    This returns True when obj is a Future instance or is advertising
    itself as duck-type compatible by setting _asyncio_future_blocking.
    See comment in Future for more details.
    """
    return (hasattr(obj.__class__, '_asyncio_future_blocking') and
            obj._asyncio_future_blocking is not None)


def _format_callbacks(cb):
    """helper function for Future.__repr__"""
    size = len(cb)
    if not size:
        cb = ''

    def format_cb(callback):
        return format_helpers._format_callback_source(callback, ())

    if size == 1:
        cb = format_cb(cb[0][0])
    elif size == 2:
        cb = '{}, {}'.format(format_cb(cb[0][0]), format_cb(cb[1][0]))
    elif size > 2:
        cb = '{}, <{} more>, {}'.format(format_cb(cb[0][0]),
                                        size - 2,
                                        format_cb(cb[-1][0]))
    return f'cb=[{cb}]'


def _future_repr_info(future):
    # (Future) -> str
    """helper function for Future.__repr__"""
    info = [future._state.lower()]
    if future._state == _FINISHED:
        if future._exception is not None:
            info.append(f'exception={future._exception!r}')
        else:
            # use reprlib to limit the length of the output, especially
            # for very long strings
            result = reprlib.repr(future._result)
            info.append(f'result={result}')
    if future._callbacks:
        info.append(_format_callbacks(future._callbacks))
    if future._source_traceback:
        frame = future._source_traceback[-1]
        info.append(f'created at {frame[0]}:{frame[1]}')
    return info


@reprlib.recursive_repr()
def _future_repr(future):
    info = ' '.join(_future_repr_info(future))
    return f'<{future.__class__.__name__} {info}>'

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
9 Dec 2025 9.24 PM
root / root
0755
__pycache__
--
9 Dec 2025 9.24 PM
root / root
0755
__init__.py
1.191 KB
3 Jun 2025 10.41 PM
root / root
0644
__main__.py
3.409 KB
3 Jun 2025 10.41 PM
root / root
0644
base_events.py
76.726 KB
3 Jun 2025 10.41 PM
root / root
0644
base_futures.py
1.928 KB
3 Jun 2025 10.41 PM
root / root
0644
base_subprocess.py
8.661 KB
3 Jun 2025 10.41 PM
root / root
0644
base_tasks.py
2.609 KB
3 Jun 2025 10.41 PM
root / root
0644
constants.py
1.38 KB
3 Jun 2025 10.41 PM
root / root
0644
coroutines.py
3.264 KB
3 Jun 2025 10.41 PM
root / root
0644
events.py
28.651 KB
3 Jun 2025 10.41 PM
root / root
0644
exceptions.py
1.711 KB
3 Jun 2025 10.41 PM
root / root
0644
format_helpers.py
2.348 KB
3 Jun 2025 10.41 PM
root / root
0644
futures.py
14.004 KB
3 Jun 2025 10.41 PM
root / root
0644
locks.py
18.55 KB
3 Jun 2025 10.41 PM
root / root
0644
log.py
0.121 KB
3 Jun 2025 10.41 PM
root / root
0644
mixins.py
0.47 KB
3 Jun 2025 10.41 PM
root / root
0644
proactor_events.py
32.715 KB
3 Jun 2025 10.41 PM
root / root
0644
protocols.py
6.794 KB
3 Jun 2025 10.41 PM
root / root
0644
queues.py
7.787 KB
3 Jun 2025 10.41 PM
root / root
0644
runners.py
7.061 KB
3 Jun 2025 10.41 PM
root / root
0644
selector_events.py
47.199 KB
3 Jun 2025 10.41 PM
root / root
0644
sslproto.py
31.151 KB
3 Jun 2025 10.41 PM
root / root
0644
staggered.py
6.911 KB
3 Jun 2025 10.41 PM
root / root
0644
streams.py
26.972 KB
3 Jun 2025 10.41 PM
root / root
0644
subprocess.py
7.556 KB
3 Jun 2025 10.41 PM
root / root
0644
taskgroups.py
9.335 KB
3 Jun 2025 10.41 PM
root / root
0644
tasks.py
36.486 KB
3 Jun 2025 10.41 PM
root / root
0644
threads.py
0.771 KB
3 Jun 2025 10.41 PM
root / root
0644
timeouts.py
5.196 KB
3 Jun 2025 10.41 PM
root / root
0644
transports.py
10.471 KB
3 Jun 2025 10.41 PM
root / root
0644
trsock.py
2.417 KB
3 Jun 2025 10.41 PM
root / root
0644
unix_events.py
51.879 KB
3 Jun 2025 10.41 PM
root / root
0644
windows_events.py
31.823 KB
3 Jun 2025 10.41 PM
root / root
0644
windows_utils.py
4.941 KB
3 Jun 2025 10.41 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF