id
int64
0
190k
prompt
stringlengths
21
13.4M
docstring
stringlengths
1
12k
187,029
import sys import re import warnings import io import collections import collections.abc import contextlib from . import ElementPath def parse(source, parser=None): """Parse XML document into element tree. *source* is a filename or file object containing XML data, *parser* is an optional parser instance def...
Convert XML to its C14N 2.0 serialised form. If *out* is provided, it must be a file or file-like object that receives the serialised canonical XML output (text, not bytes) through its ``.write()`` method. To write to a file, open it in text mode with encoding "utf-8". If *out* is not provided, this function returns th...
187,031
import sys import re import warnings import io import collections import collections.abc import contextlib from . import ElementPath def _raise_serialization_error(text): def _escape_attrib_c14n(text): # escape attribute value try: if '&' in text: text = text.replace('&', '&') i...
null
187,032
import re def _is_wildcard_tag(tag): def _prepare_tag(tag): def prepare_child(next, token): tag = token[1] if _is_wildcard_tag(tag): select_tag = _prepare_tag(tag) def select(context, result): def select_child(result): for elem in result: yield fr...
null
187,037
import re def get_parent_map(context): def iterfind(elem, path, namespaces=None): def find(elem, path, namespaces=None): def findall(elem, path, namespaces=None): def prepare_predicate(next, token): # FIXME: replace with real parser!!! refs: # http://javascript.crockford.com/tdop/tdop.html signature = [] ...
null
187,039
import copy from . import ElementTree from urllib.parse import urljoin DEFAULT_MAX_INCLUSION_DEPTH = 6 def default_loader(href, parse, encoding=None): def _include(elem, loader, base_url, max_depth, _parent_hrefs): def include(elem, loader=None, base_url=None, max_depth=DEFAULT_MAX_INCLUSION_DEPTH): if...
null
187,042
import io import xml.dom from xml.dom import EMPTY_NAMESPACE, EMPTY_PREFIX, XMLNS_NAMESPACE, domreg from xml.dom.minicompat import * from xml.dom.xmlbuilder import DOMImplementationLS, DocumentLS class Node(xml.dom.Node): namespaceURI = None # this is non-null only for elements and attributes parentNode = None ...
null
187,043
import io import xml.dom from xml.dom import EMPTY_NAMESPACE, EMPTY_PREFIX, XMLNS_NAMESPACE, domreg from xml.dom.minicompat import * from xml.dom.xmlbuilder import DOMImplementationLS, DocumentLS class Node(xml.dom.Node): namespaceURI = None # this is non-null only for elements and attributes parentNode = None ...
null
187,050
import io import xml.dom from xml.dom import EMPTY_NAMESPACE, EMPTY_PREFIX, XMLNS_NAMESPACE, domreg from xml.dom.minicompat import * from xml.dom.xmlbuilder import DOMImplementationLS, DocumentLS class Document(Node, DocumentLS): __slots__ = ('_elem_info', 'doctype', '_id_search_stack', 'childNodes...
null
187,059
import xml.sax import xml.sax.handler class DOMEventStream: def __init__(self, stream, parser, bufsize): def reset(self): def __getitem__(self, pos): def __next__(self): def __iter__(self): def expandNode(self, node): def getEvent(self): def _slurp(self): def _emit(self): ...
null
187,065
import os from concurrent.futures import _base import queue import multiprocessing as mp import multiprocessing.connection from multiprocessing.queues import Queue import threading import weakref from functools import partial import itertools import sys import traceback _threads_wakeups = weakref.WeakKeyDictionary() _g...
null
187,069
import os from concurrent.futures import _base import queue import multiprocessing as mp import multiprocessing.connection from multiprocessing.queues import Queue import threading import weakref from functools import partial import itertools import sys import traceback class _ExceptionWithTraceback: def __init__(s...
Evaluates calls from call_queue and places the results in result_queue. This worker is run in a separate process. Args: call_queue: A ctx.Queue of _CallItems that will be read and evaluated by the worker. result_queue: A ctx.Queue of _ResultItems that will written to by the worker. initializer: A callable initializer, ...
187,094
import _socket from _socket import * import os, sys, io, selectors from enum import IntEnum, IntFlag class socket(_socket.socket): """A subclass of _socket.socket adding the makefile() method.""" __slots__ = ["__weakref__", "_io_refs", "_closed"] def __init__(self, family=-1, type=-1, proto=-1, fileno=None)...
fromfd(fd, family, type[, proto]) -> socket object Create a socket object from a duplicate of the given file descriptor. The remaining arguments are the same as for socket().
187,097
import _socket from _socket import * import os, sys, io, selectors from enum import IntEnum, IntFlag class socket(_socket.socket): """A subclass of _socket.socket adding the makefile() method.""" __slots__ = ["__weakref__", "_io_refs", "_closed"] def __init__(self, family=-1, type=-1, proto=-1, fileno=None)...
fromshare(info) -> socket object Create a socket object from the bytes object returned by socket.share(pid).
187,098
import _socket from _socket import * import os, sys, io, selectors from enum import IntEnum, IntFlag class socket(_socket.socket): """A subclass of _socket.socket adding the makefile() method.""" __slots__ = ["__weakref__", "_io_refs", "_closed"] def __init__(self, family=-1, type=-1, proto=-1, fileno=None)...
socketpair([family[, type[, proto]]]) -> (socket object, socket object) Create a pair of socket objects from the sockets returned by the platform socketpair() function. The arguments are the same as for socket() except the default family is AF_UNIX if defined on the platform; otherwise, the default is AF_INET.
187,099
import _socket from _socket import * import os, sys, io, selectors from enum import IntEnum, IntFlag _LOCALHOST = '127.0.0.1' _LOCALHOST_V6 = '::1' class socket(_socket.socket): """A subclass of _socket.socket adding the makefile() method.""" __slots__ = ["__weakref__", "_io_refs", "_closed"] def __init_...
null
187,101
import _socket from _socket import * import os, sys, io, selectors from enum import IntEnum, IntFlag try: import errno except ImportError: errno = None class socket(_socket.socket): """A subclass of _socket.socket adding the makefile() method.""" __slots__ = ["__weakref__", "_io_refs", "_closed"] de...
Convenience function which creates a SOCK_STREAM type socket bound to *address* (a 2-tuple (host, port)) and return the socket object. *family* should be either AF_INET or AF_INET6. *backlog* is the queue size passed to socket.listen(). *reuse_port* dictates whether to use the SO_REUSEPORT socket option. *dualstack_ipv...
187,107
import re import socket import collections import datetime import sys from email.header import decode_header as _email_decode_header from socket import _GLOBAL_DEFAULT_TIMEOUT class datetime(date): """datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]]) The year, month and day argume...
Parse a pair of (date, time) strings, and return a datetime object. If only the date is given, it is assumed to be date and time concatenated together (e.g. response to the DATE command).
187,108
import re import socket import collections import datetime import sys from email.header import decode_header as _email_decode_header from socket import _GLOBAL_DEFAULT_TIMEOUT class datetime(date): """datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]]) The year, month and day argume...
Format a date or datetime object as a pair of (date, time) strings in the format required by the NEWNEWS and NEWGROUPS commands. If a date object is passed, the time is assumed to be midnight (00h00). The returned representation depends on the legacy flag: * if legacy is False (the default): date has the YYYYMMDD forma...
187,119
import sys import encodings import encodings.aliases import re import _collections_abc from builtins import str as _builtin_str import functools try: from _locale import * except ImportError: # Locale emulation CHAR_MAX = 127 LC_ALL = 6 LC_COLLATE = 3 LC_CTYPE = 0 LC_MESSAGES = 5 LC_MONE...
Formats val according to the currency settings in the current locale.
187,120
import sys import encodings import encodings.aliases import re import _collections_abc from builtins import str as _builtin_str import functools def _localize(formatted, grouping=False, monetary=False): # floats and decimal ints need special action! if '.' in formatted: seps = 0 parts = formatte...
Parses a string as locale number according to the locale settings.
187,135
import os import itertools import sys import weakref import atexit import threading from subprocess import _args_from_interpreter_flags from . import process import sys if '__main__' in sys.modules: sys.modules['__mp_main__'] = sys.modules['__main__'] def _close_stdin(): if sys.stdin is None: ...
null
187,137
import os import itertools import sys import weakref import atexit import threading from subprocess import _args_from_interpreter_flags from . import process def spawnv_passfds(path, args, passfds): import _posixsubprocess passfds = tuple(sorted(map(int, passfds))) errpipe_read, errpipe_write = os.p...
null
187,153
import collections import itertools import os import queue import threading import time import traceback import types import warnings from . import util from . import get_context, TimeoutError from .connection import wait class ExceptionWithTraceback: def __init__(self, exc, tb): def __reduce__(self): class M...
null
187,182
import io import os import sys import socket import struct import time import tempfile import itertools import _multiprocessing from . import util from . import AuthenticationError, BufferTooShort from .context import reduction try: import _winapi from _winapi import WAIT_OBJECT_0, WAIT_ABANDONED_0, WAIT_TIMEOU...
null
187,185
from queue import Queue class Connection(object): def __init__(self, _in, _out): self._out = _out self._in = _in self.send = self.send_bytes = _out.put self.recv = self.recv_bytes = _in.get def poll(self, timeout=0.0): if self._in.qsize() > 0: return True ...
null
187,186
import sys import os import builtins import _sitebuiltins import io if not sys.flags.no_site: main() from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep, devnull) The provided code snippet includes necessary dependencies for implementing the `abs_paths` function. Write a Python function...
Set all module __file__ and __cached__ attributes to an absolute path
187,189
import sys import os import builtins import _sitebuiltins import io ENABLE_USER_SITE = None def _trace(message): if sys.flags.verbose: print(message, file=sys.stderr) def addsitedir(sitedir, known_paths=None): """Add 'sitedir' argument to sys.path if missing and handle .pth files in 'sitedir'""" ...
Add a per user site-package to sys.path Each user has its own python directory with site-packages in the home directory.
187,194
import sys import os import builtins import _sitebuiltins import io PREFIXES = [sys.prefix, sys.exec_prefix] ENABLE_USER_SITE = None def addsitepackages(known_paths, prefixes=None): """Add site-packages to sys.path""" _trace("Processing global site-packages") for sitedir in getsitepackages(prefixes): ...
null
187,197
import sys import os import builtins import _sitebuiltins import io if not sys.flags.no_site: main() from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep, devnull) def init_cinder(): # ensure the CinderX pure-Python code is importable (only needed for in-repo # builds; Buck insta...
null
187,198
import sys import os import builtins import _sitebuiltins import io ENABLE_USER_SITE = None USER_SITE = None USER_BASE = None def getuserbase(): def getusersitepackages(): if not sys.flags.no_site: main() from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep, devnull) def _script(): h...
null
187,199
from select import select import os import sys import tty from os import close, waitpid from tty import setraw, tcgetattr, tcsetattr def openpty(): """openpty() -> (master_fd, slave_fd) Open a pty master/slave pair, using os.openpty() if possible.""" try: return os.openpty() except (AttributeErr...
master_open() -> (master_fd, slave_name) Open a pty master and return the fd, and the filename of the slave end. Deprecated, use openpty() instead.
187,200
from select import select import os import sys import tty from os import close, waitpid from tty import setraw, tcgetattr, tcsetattr STDIN_FILENO = 0 CHILD = 0 def fork(): """fork() -> (pid, master_fd) Fork and make the child a session leader with a controlling terminal.""" try: pid, fd = os.forkpty...
Create a spawned process.
187,203
def pickle_union(obj): import functools, operator return functools.reduce, (operator.or_, obj.__args__)
null
187,204
def _reconstructor(cls, base, state): if base is object: obj = object.__new__(cls) else: obj = base.__new__(cls, state) if base.__init__ != object.__init__: base.__init__(obj, state) return obj _HEAPTYPE = 1<<9 _new_type = type(int.__new__) def _reduce_ex(self, proto): ...
null
187,215
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings logfile = "" logfp = None def initlog(*allarg...
Close the log file.
187,216
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings maxlen = 0 def parse_multipart(fp, pdict, encoding="utf-8", errors=...
Parse a query in the environment or from a file (default stdin) Arguments, all optional: fp : file pointer; default: sys.stdin.buffer environ : environment dictionary; default: os.environ keep_blank_values: flag indicating whether blank values in percent-encoded forms should be treated as blank strings. A true value in...
187,217
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings def print_exception(type=None, value=None, tb=None, limit=None): ...
null
187,218
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings from os.path import (curdir, pardir, sep, pathsep, defpath, extsep...
Dump the shell environment as HTML.
187,219
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings The provided code snippet includes necessary dependencies for impl...
Dump the contents of a form as HTML.
187,220
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings from os.path import (curdir, pardir, sep, pathsep, defpath, extsep...
Dump the current directory as HTML.
187,221
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings def print_arguments(): print() print("<H3>Command Line Arg...
null
187,222
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings The provided code snippet includes necessary dependencies for impl...
Dump a list of environment variables used by CGI as HTML.
187,223
from io import StringIO, BytesIO, TextIOWrapper from collections.abc import Mapping import sys import os import urllib.parse from email.parser import FeedParser from email.message import Message import html import locale import tempfile import warnings def valid_boundary(s): import re if isinstance(s, bytes): ...
null
187,231
import os import sys from os.path import pardir, realpath _INSTALL_SCHEMES = { 'posix_prefix': { 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', 'purelib': '{base}/lib/python{py_version_short}/site-packages...
Return a tuple containing the schemes names.
187,233
import os import sys from os.path import pardir, realpath _findvar1_rx = r"\$\(([A-Za-z][A-Za-z0-9_]*)\)" _findvar2_rx = r"\${([A-Za-z][A-Za-z0-9_]*)}" The provided code snippet includes necessary dependencies for implementing the `expand_makefile_vars` function. Write a Python function `def expand_makefile_vars(s, va...
Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in 'string' according to 'vars' (a dictionary mapping variable names to values). Variables not present in 'vars' are silently expanded to the empty string. The variable values in 'vars' should not contain further variable expansions; if 'vars' is the output of ...
187,234
import os import sys from os.path import pardir, realpath if sys.executable: _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable)) else: # sys.executable can be empty if argv[0] has been changed and Python is # unable to retrieve the real program name _PROJECT_BASE = _safe_realpath(os.getcwd()...
Display all information sysconfig detains.
187,235
import time as _time import math as _math import sys from operator import index as _index def _cmp(x, y): return 0 if x == y else 1 if x > y else -1
null
187,236
import time as _time import math as _math import sys from operator import index as _index _DAYS_IN_MONTH = [-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] _DAYS_BEFORE_MONTH = [-1] def _is_leap(year): "year -> 1 if leap year, else 0." return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) def _days...
ordinal -> (year, month, day), considering 01-Jan-0001 as day 1.
187,237
import time as _time import math as _math import sys from operator import index as _index def _days_before_month(year, month): "year, month -> number of days in year preceding first day of month." assert 1 <= month <= 12, 'month must be in 1..12' return _DAYS_BEFORE_MONTH[month] + (month > 2 and _is_leap(ye...
null
187,238
import time as _time import math as _math import sys from operator import index as _index def _format_time(hh, mm, ss, us, timespec='auto'): specs = { 'hours': '{:02d}', 'minutes': '{:02d}:{:02d}', 'seconds': '{:02d}:{:02d}:{:02d}', 'milliseconds': '{:02d}:{:02d}:{:02d}.{:03d}', ...
null
187,239
import time as _time import math as _math import sys from operator import index as _index class timedelta: """Represent the difference between two datetime objects. Supported operators: - add, subtract timedelta - unary plus, minus, abs - compare to timedelta - multiply, divide by int In add...
null
187,240
import time as _time import math as _math import sys from operator import index as _index class timedelta: """Represent the difference between two datetime objects. Supported operators: - add, subtract timedelta - unary plus, minus, abs - compare to timedelta - multiply, divide by int In add...
null
187,241
import time as _time import math as _math import sys from operator import index as _index def _parse_isoformat_date(dtstr): # It is assumed that this function will only be called with a # string of length exactly 10, and (though this is not used) ASCII-only year = int(dtstr[0:4]) if dtstr[4] != '-': ...
null
187,242
import time as _time import math as _math import sys from operator import index as _index def _parse_hh_mm_ss_ff(tstr): # Parses things of the form HH[:MM[:SS[.fff[fff]]]] len_str = len(tstr) time_comps = [0, 0, 0, 0] pos = 0 for comp in range(0, 3): if (len_str - pos) < 2: raise...
null
187,243
import time as _time import math as _math import sys from operator import index as _index def _check_tzname(name): if name is not None and not isinstance(name, str): raise TypeError("tzinfo.tzname() must return None or string, " "not '%s'" % type(name))
null
187,244
import time as _time import math as _math import sys from operator import index as _index class timedelta: """Represent the difference between two datetime objects. Supported operators: - add, subtract timedelta - unary plus, minus, abs - compare to timedelta - multiply, divide by int In add...
null
187,245
import time as _time import math as _math import sys from operator import index as _index MINYEAR = 1 MAXYEAR = 9999 for dim in _DAYS_IN_MONTH[1:]: _DAYS_BEFORE_MONTH.append(dbm) dbm += dim def _days_in_month(year, month): "year, month -> number of days in that month in that year." assert 1 <= month <=...
null
187,246
import time as _time import math as _math import sys from operator import index as _index def _check_time_fields(hour, minute, second, microsecond, fold): hour = _index(hour) minute = _index(minute) second = _index(second) microsecond = _index(microsecond) if not 0 <= hour <= 23: raise Valu...
null
187,247
import time as _time import math as _math import sys from operator import index as _index class tzinfo: """Abstract base class for time zone info classes. Subclasses must override the name(), utcoffset() and dst() methods. """ __slots__ = () def tzname(self, dt): "datetime -> string name of ...
null
187,248
import time as _time import math as _math import sys from operator import index as _index def _cmperror(x, y): raise TypeError("can't compare '%s' to '%s'" % ( type(x).__name__, type(y).__name__))
null
187,249
import time as _time import math as _math import sys from operator import index as _index The provided code snippet includes necessary dependencies for implementing the `_divide_and_round` function. Write a Python function `def _divide_and_round(a, b)` to solve the following problem: divide a by b and round result to ...
divide a by b and round result to the nearest integer When the ratio is exactly half-way between two integers, the even integer is returned.
187,250
import time as _time import math as _math import sys from operator import index as _index def _ymd2ord(year, month, day): def _isoweek1monday(year): # Helper to calculate the day number of the Monday starting week 1 # XXX This could be done more efficiently THURSDAY = 3 firstday = _ymd2ord(year, 1, 1) ...
null
187,261
import sys from _ast import * from contextlib import contextmanager, nullcontext from enum import IntEnum, auto class _Unparser(NodeVisitor): """Methods in this class recursively traverse an AST and output source code for the abstract syntax; original formatting is disregarded.""" def __init__(self, *, ...
null
187,266
import os import shutil import subprocess import sys if os.name == "nt": elif os.name == "posix" and sys.platform == "darwin": from ctypes.macholib.dyld import dyld_find as _dyld_find elif sys.platform.startswith("aix"): # AIX has two styles of storing shared libraries # GNU auto_tools refer to these as svr...
null
187,281
import os import abc import codecs import errno import stat import sys from _thread import allocate_lock as Lock import io from io import (__all__, SEEK_SET, SEEK_CUR, SEEK_END) def open(file, mode="r", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None): r"""Open file and re...
Opens the provided file with mode ``'rb'``. This function should be used when the intent is to treat the contents as executable code. ``path`` should be an absolute path. When supported by the runtime, this function can be hooked in order to allow embedders more control over code files. This functionality is not suppor...
187,282
import os import abc import codecs import errno import stat import sys from _thread import allocate_lock as Lock import io from io import (__all__, SEEK_SET, SEEK_CUR, SEEK_END) def open(file, mode="r", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None): r"""Open file and re...
null
187,284
import atexit import builtins import inspect import __main__ def get_class_members(klass): ret = dir(klass) if hasattr(klass,'__bases__'): for base in klass.__bases__: ret = ret + get_class_members(base) return ret
null
187,292
import os import re import sys def _supports_universal_builds(): """Returns True if universal builds are supported on this system""" # As an approximation, we assume that if we are running on 10.4 or above, # then we are running with an Xcode environment that supports universal # builds, in particular -...
This function will strip '-isysroot PATH' and '-arch ARCH' from the compile flags if the user has specified one them in extra_compile_flags. This is needed because '-arch ARCH' adds another architecture to the build, without a way to remove an architecture. Furthermore GCC will barf if multiple '-isysroot' arguments ar...
187,294
import fnmatch import sys import os from inspect import CO_GENERATOR, CO_COROUTINE, CO_ASYNC_GENERATOR class Bdb: """Generic Python debugger base class. This class takes care of details of the trace facility; a derived class should implement user interaction. The standard debugger class (pdb.Pdb) is an ...
Start debugging with a Bdb instance from the caller's frame.
187,295
import fnmatch import sys import os from inspect import CO_GENERATOR, CO_COROUTINE, CO_ASYNC_GENERATOR class Breakpoint: """Breakpoint class. Implements temporary breakpoints, ignore counts, disabling and (re)-enabling, and conditionals. Breakpoints are indexed by number through bpbynumber and by th...
Determine which breakpoint for this file:line is to be acted upon. Called only if we know there is a breakpoint at this location. Return the breakpoint that was triggered and a boolean that indicates if it is ok to delete a temporary breakpoint. Return (None, None) if there is no matching breakpoint.
187,315
import abc import ast import dis import collections.abc import enum import importlib.machinery import itertools import linecache import os import re import sys import tokenize import token import types import warnings import functools import builtins from operator import attrgetter from collections import namedtuple, O...
Return list of attribute-descriptor tuples. For each name in dir(cls), the return list contains a 4-tuple with these elements: 0. The name (a string). 1. The kind of attribute this is, one of these strings: 'class method' created via classmethod() 'static method' created via staticmethod() 'property' created via proper...
187,318
import abc import ast import dis import collections.abc import enum import importlib.machinery import itertools import linecache import os import re import sys import tokenize import token import types import warnings import functools import builtins from operator import attrgetter from collections import namedtuple, O...
Get the names and default values of a function's parameters. A tuple of four things is returned: (args, varargs, keywords, defaults). 'args' is a list of the argument names, including keyword-only argument names. 'varargs' and 'keywords' are the names of the * and ** parameters or None. 'defaults' is an n-tuple of the ...
187,321
import abc import ast import dis import collections.abc import enum import importlib.machinery import itertools import linecache import os import re import sys import tokenize import token import types import warnings import functools import builtins from operator import attrgetter from collections import namedtuple, O...
Get the mapping of arguments to values. A dict is returned, with keys the function argument names (including the names of the * and ** arguments, if any), and values the respective bound values from 'positional' and 'named'.
187,322
import abc import ast import dis import collections.abc import enum import importlib.machinery import itertools import linecache import os import re import sys import tokenize import token import types import warnings import functools import builtins from operator import attrgetter from collections import namedtuple, O...
Get the mapping of free variables to their current values. Returns a named tuple of dicts mapping the current nonlocal, global and builtin references as seen by the body of the function. A final set of unbound names that could not be resolved is also provided.
187,328
import abc import ast import dis import collections.abc import enum import importlib.machinery import itertools import linecache import os import re import sys import tokenize import token import types import warnings import functools import builtins from operator import attrgetter from collections import namedtuple, O...
Get current state of a generator-iterator. Possible states are: GEN_CREATED: Waiting to start execution. GEN_RUNNING: Currently being executed by the interpreter. GEN_SUSPENDED: Currently suspended at a yield expression. GEN_CLOSED: Execution has completed.
187,330
import abc import ast import dis import collections.abc import enum import importlib.machinery import itertools import linecache import os import re import sys import tokenize import token import types import warnings import functools import builtins from operator import attrgetter from collections import namedtuple, O...
Get current state of a coroutine object. Possible states are: CORO_CREATED: Waiting to start execution. CORO_RUNNING: Currently being executed by the interpreter. CORO_SUSPENDED: Currently suspended at an await expression. CORO_CLOSED: Execution has completed.
187,333
import abc import ast import dis import collections.abc import enum import importlib.machinery import itertools import linecache import os import re import sys import tokenize import token import types import warnings import functools import builtins from operator import attrgetter from collections import namedtuple, O...
Logic for inspecting an object given at command line
187,334
import ast import sys import importlib.util class Function(_Object): "Information about a Python function, including methods." def __init__(self, module, name, file, lineno, parent=None, is_async=False, *, end_lineno=None): super().__init__(module, name, file, lineno, end_lineno, parent...
Return a Function after nesting within ob.
187,335
import ast import sys import importlib.util class Class(_Object): "Information about a Python class." def __init__(self, module, name, super_, file, lineno, parent=None, *, end_lineno=None): super().__init__(module, name, file, lineno, end_lineno, parent) self.super = super_ or ...
Return a Class after nesting within ob.
187,336
import ast import sys import importlib.util class Class(_Object): "Information about a Python class." def __init__(self, module, name, super_, file, lineno, parent=None, *, end_lineno=None): super().__init__(module, name, file, lineno, end_lineno, parent) self.super = super_ or ...
Return Class objects for the top-level classes in module. This is the original interface, before Functions were added.
187,337
import ast import sys import importlib.util class _Object: "Information about Python class or function." def __init__(self, module, name, file, lineno, end_lineno, parent): self.module = module self.name = name self.file = file self.lineno = lineno self.end_lineno = end_l...
Print module output (default this file) for quick visual check.
187,338
from warnings import warn as _warn from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil from math import sqrt as _sqrt, acos as _acos, cos as _cos, sin as _sin from math import tau as TWOPI, floor as _floor, isfinite as _isfinite from os import urandom as _urandom from _collections_abc import Se...
null
187,339
import _codecs_jp, codecs import _multibytecodec as mbc class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): codec = codec class IncrementalDecoder(mbc.MultibyteIncrementalDecoder...
null
187,341
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,342
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,347
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,348
import _codecs_iso2022, codecs import _multibytecodec as mbc class Codec(codecs.Codec): class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): class Stre...
null
187,361
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,365
import _codecs_jp, codecs import _multibytecodec as mbc class Codec(codecs.Codec): class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): class StreamRea...
null
187,367
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,372
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,374
import codecs class Codec(codecs.Codec): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False): class StreamWriter(Codec,codecs.StreamWriter): class StreamReader(Codec,codecs.StreamRe...
null
187,379
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='strict'): return codecs.charmap_decode(input,errors,decoding_table) class IncrementalEncoder(codecs.IncrementalEncoder): de...
null
187,384
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,386
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,390
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null
187,397
import _codecs_cn, codecs import _multibytecodec as mbc class Codec(codecs.Codec): class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): class StreamRea...
null
187,398
import _codecs_kr, codecs import _multibytecodec as mbc class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): codec = codec class IncrementalDecoder(mbc.MultibyteIncrementalDecoder...
null
187,401
import _codecs_iso2022, codecs import _multibytecodec as mbc class Codec(codecs.Codec): class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): class Stre...
null
187,406
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): def decode(self,input,errors='strict'): class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False...
null