Created
September 7, 2018 16:48
-
-
Save notro/63d716efef0fb12fcc9edcd151c684b1 to your computer and use it in GitHub Desktop.
CPython stdlib grep of MICROPY_CPYTHON_COMPAT features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ grep -RE "\.__init__|\.__new__|\.__class__|\.__class__|\.__name__" . | |
./_collections_abc.py: return '{0.__class__.__name__}({0._mapping!r})'.format(self) | |
./ntpath.py: "not '{}'".format(s.__class__.__name__)) | |
./ast.py: rv = '%s(%s' % (node.__class__.__name__, ', '.join( | |
./ast.py: raise TypeError('expected AST, got %r' % node.__class__.__name__) | |
./ast.py: raise TypeError("%r can't have docstrings" % node.__class__.__name__) | |
./ast.py: method = 'visit_' + node.__class__.__name__ | |
./site.py: (err.__class__.__name__, err)) | |
./site.py: (err.__class__.__name__, err)) | |
./imaplib.py: IMAP4.__init__(self, host, port) | |
./imaplib.py: IMAP4.__init__(self) | |
./dis.py: type(x).__name__) | |
./dis.py: type(x).__name__) | |
./dis.py: return "{}({!r})".format(self.__class__.__name__, | |
./ctypes/wintypes.py: return "%s(%r)" % (self.__class__.__name__, self.value) | |
./ctypes/__init__.py: return "%s(<NULL>)" % type(self).__name__ | |
./ctypes/__init__.py: return "%s(%r)" % (self.__class__.__name__, self.value) | |
./ctypes/__init__.py: return "%s(%s)" % (self.__class__.__name__, cast(self, c_void_p).value) | |
./ctypes/__init__.py: return "%s(%s)" % (self.__class__.__name__, cast(self, c_void_p).value) | |
./ctypes/__init__.py: (self.__class__.__name__, self._name, | |
./ctypes/__init__.py: func.__name__ = name_or_ordinal | |
./ctypes/test/test_bitfields.py: return detail.__class__, str(detail) | |
./ctypes/test/test_repr.py: self.assertTrue(repr(base(42)).startswith(base.__name__)) | |
./ctypes/test/test_structures.py: return detail.__class__, str(detail) | |
./ctypes/test/test_init.py: result = super().__new__(cls) | |
./fractions.py: self = super(Fraction, cls).__new__(cls) | |
./fractions.py: (cls.__name__, f, type(f).__name__)) | |
./fractions.py: raise ValueError("Cannot convert %r to %s." % (f, cls.__name__)) | |
./fractions.py: raise OverflowError("Cannot convert %r to %s." % (f, cls.__name__)) | |
./fractions.py: (cls.__name__, dec, type(dec).__name__)) | |
./fractions.py: "Cannot convert %s to %s." % (dec, cls.__name__)) | |
./fractions.py: raise ValueError("Cannot convert %s to %s." % (dec, cls.__name__)) | |
./fractions.py: forward.__name__ = '__' + fallback_operator.__name__ + '__' | |
./fractions.py: reverse.__name__ = '__r' + fallback_operator.__name__ + '__' | |
./fractions.py: return (self.__class__, (str(self),)) | |
./fractions.py: return self.__class__(self._numerator, self._denominator) | |
./fractions.py: return self.__class__(self._numerator, self._denominator) | |
./msilib/__init__.py: raise TypeError("Unsupported type %s" % field.__class__.__name__) | |
./pathlib.py: _Selector.__init__(self, child_parts) | |
./pathlib.py: _Selector.__init__(self, child_parts) | |
./pathlib.py: _Selector.__init__(self, child_parts) | |
./pathlib.py: return "<{}.parents>".format(self._pathcls.__name__) | |
./pathlib.py: return (self.__class__, tuple(self._parts)) | |
./pathlib.py: self = object.__new__(cls) | |
./pathlib.py: self = object.__new__(cls) | |
./pathlib.py: return "{}({!r})".format(self.__class__.__name__, self.as_posix()) | |
./pathlib.py: % (cls.__name__,)) | |
./pstats.py: % (self.__class__, arg)) | |
./pstats.py: cmd.Cmd.__init__(self) | |
./pstats.py: print(err.__class__.__name__ + ':', err, file=self.stream) | |
./symtable.py: if self.__class__ == SymbolTable: | |
./symtable.py: kind = "%s " % self.__class__.__name__ | |
./pydoc_data/topics.py: ' obj).m()" searches "obj.__class__.__mro__" for the ' | |
./pydoc_data/topics.py: 'obj.__class__)".\n' | |
./pydoc_data/topics.py: 'object.__new__(cls[, ...])\n' | |
./pydoc_data/topics.py: ' "super(currentclass, cls).__new__(cls[, ...])" with ' | |
./pydoc_data/topics.py: 'object.__init__(self[, ...])\n' | |
./pydoc_data/topics.py: ' "BaseClass.__init__(self, [args...])".\n' | |
./pydoc_data/topics.py: 'instance.__class__\n' | |
./pydoc_data/topics.py: 'class.__name__\n' | |
./pydoc_data/topics.py: 'object.__new__(cls[, ...])\n' | |
./pydoc_data/topics.py: ' "super(currentclass, cls).__new__(cls[, ...])" with ' | |
./pydoc_data/topics.py: 'object.__init__(self[, ...])\n' | |
./pydoc_data/topics.py: ' "BaseClass.__init__(self, [args...])".\n' | |
./pydoc_data/topics.py: ' obj).m()" searches "obj.__class__.__mro__" for the base ' | |
./pydoc_data/topics.py: ' call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n' | |
./pydoc_data/topics.py: ' result = type.__new__(cls, name, bases, ' | |
./pydoc_data/topics.py: ' is the method name (same as "__func__.__name__"); ' | |
./trace.py: self.update(self.__class__(counts, calledfuncs, callers)) | |
./trace.py: clsname = classes[0].__name__ | |
./trace.py: _Ignore.__init__(self, modules, dirs) | |
./string.py: super(_TemplateMetaclass, cls).__init__(name, bases, dct) | |
./gettext.py: (n.__class__.__name__,)) from None | |
./os.py: raise TypeError("str expected, not %s" % type(value).__name__) | |
./os.py: raise TypeError("str expected, not %s" % type(value).__name__) | |
./os.py: raise TypeError("bytes expected, not %s" % type(value).__name__) | |
./os.py: raise TypeError("expect bytes or str, not %s" % type(filename).__name__) | |
./os.py: raise TypeError("expect bytes or str, not %s" % type(filename).__name__) | |
./weakref.py: self = ref.__new__(cls, obj, _cb) | |
./weakref.py: new = self.__class__() | |
./weakref.py: self = ref.__new__(type, ob, callback) | |
./weakref.py: super().__init__(ob, callback) | |
./weakref.py: new = self.__class__() | |
./weakref.py: return '<%s object at %#x; dead>' % (type(self).__name__, id(self)) | |
./weakref.py: (type(self).__name__, id(self), type(obj).__name__, id(obj)) | |
./pdb.py: bdb.Bdb.__init__(self, skip=skip) | |
./pdb.py: cmd.Cmd.__init__(self, completekey, stdin, stdout) | |
./pdb.py: if func.__name__ in self.commands_resuming: | |
./pdb.py: if value.__class__ is type: | |
./pdb.py: self.message('Class %s.%s' % (value.__module__, value.__name__)) | |
./pkgutil.py: walk_packages(ctypes.__path__, ctypes.__name__+'.') | |
./pkgutil.py: fullname = module.__name__ | |
./reprlib.py: wrapper.__name__ = getattr(user_function, '__name__') | |
./reprlib.py: typename = type(x).__name__ | |
./reprlib.py: return '<%s instance at %x>' % (x.__class__.__name__, id(x)) | |
./tempfile.py: return "<{} {!r}>".format(self.__class__.__name__, self.name) | |
./ipaddress.py: first = first.__class__(first_int) | |
./ipaddress.py: return self.__class__(int(self) + other) | |
./ipaddress.py: return self.__class__(int(self) - other) | |
./ipaddress.py: return '%s(%r)' % (self.__class__.__name__, str(self)) | |
./ipaddress.py: return '%s(%r)' % (self.__class__.__name__, str(self)) | |
./ipaddress.py: other = other.__class__('%s/%s' % (other.network_address, | |
./ipaddress.py: first = self.__class__('%s/%s' % | |
./ipaddress.py: current = self.__class__('%s/%s' % (new_addr, | |
./ipaddress.py: t = self.__class__('%s/%d' % (self.network_address, | |
./ipaddress.py: return t.__class__('%s/%d' % (t.network_address, t.prefixlen)) | |
./ipaddress.py: _BaseAddress.__init__(self, address) | |
./ipaddress.py: _BaseV4.__init__(self, address) | |
./ipaddress.py: IPv4Address.__init__(self, address) | |
./ipaddress.py: IPv4Address.__init__(self, addr[0]) | |
./ipaddress.py: _BaseV4.__init__(self, address) | |
./ipaddress.py: _BaseNetwork.__init__(self, address) | |
./ipaddress.py: _BaseAddress.__init__(self, address) | |
./ipaddress.py: _BaseV6.__init__(self, address) | |
./ipaddress.py: IPv6Address.__init__(self, address) | |
./ipaddress.py: IPv6Address.__init__(self, addr[0]) | |
./ipaddress.py: _BaseV6.__init__(self, address) | |
./ipaddress.py: _BaseNetwork.__init__(self, address) | |
./multiprocessing/synchronize.py: SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX, ctx=ctx) | |
./multiprocessing/synchronize.py: SemLock.__init__(self, SEMAPHORE, value, value, ctx=ctx) | |
./multiprocessing/synchronize.py: SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) | |
./multiprocessing/synchronize.py: SemLock.__init__(self, RECURSIVE_MUTEX, 1, 1, ctx=ctx) | |
./multiprocessing/dummy/__init__.py: threading.Thread.__init__(self, group, target, name, args, kwargs) | |
./multiprocessing/dummy/__init__.py: return '<%s(%r, %r)>'%(type(self).__name__,self._typecode,self._value) | |
./multiprocessing/queues.py: Queue.__init__(self, maxsize, ctx=ctx) | |
./multiprocessing/reduction.py: super().__init__(*args) | |
./multiprocessing/reduction.py: return getattr, (m.__class__, m.__func__.__name__) | |
./multiprocessing/reduction.py: return getattr, (m.__self__, m.__func__.__name__) | |
./multiprocessing/reduction.py: return getattr, (m.__objclass__, m.__name__) | |
./multiprocessing/heap.py: self.__init__() # reinitialize after fork | |
./multiprocessing/sharedctypes.py: obj.__init__(*args) | |
./multiprocessing/sharedctypes.py: result.__init__(*size_or_initializer) | |
./multiprocessing/sharedctypes.py: classname = 'Synchronized' + cls.__name__ | |
./multiprocessing/sharedctypes.py: return '<%s wrapper for %s>' % (type(self).__name__, self._obj) | |
./multiprocessing/popen_spawn_posix.py: super().__init__(process_obj) | |
./multiprocessing/pool.py: super(MaybeEncodingError, self).__init__(self.exc, self.value) | |
./multiprocessing/pool.py: ApplyResult.__init__(self, cache, callback, | |
./multiprocessing/pool.py: Pool.__init__(self, processes, initializer, initargs) | |
./multiprocessing/popen_forkserver.py: super().__init__(process_obj) | |
./multiprocessing/managers.py: self._process.name = type(self).__name__ + '-' + ident | |
./multiprocessing/managers.py: temp.__name__ = typeid | |
./multiprocessing/managers.py: (type(self).__name__, self._token.typeid, '0x%x' % id(self)) | |
./multiprocessing/managers.py: return '%s(%r, %r)'%(type(self).__name__, self._typecode, self._value) | |
./multiprocessing/context.py: ' through inheritance' % type(obj).__name__ | |
./multiprocessing/process.py: self._name = name or type(self).__name__ + '-' + \ | |
./multiprocessing/process.py: return '<%s(%s, %s%s)>' % (type(self).__name__, self._name, | |
./decimal.py: self = object.__new__(cls) | |
./decimal.py: return (self.__class__, (str(self),)) | |
./decimal.py: return self.__class__(str(self)) | |
./decimal.py: return self.__class__(str(self)) | |
./decimal.py: self = object.__new__(Decimal) | |
./decimal.py: return (self.__class__, | |
./decimal.py: names = [f.__name__ for f, v in self.flags.items() if v] | |
./decimal.py: names = [t.__name__ for t, v in self.traps.items() if v] | |
./warnings.py: s = "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message) | |
./warnings.py: category = message.__class__ | |
./warnings.py: category = message.__class__ | |
./warnings.py: self._category_name = category.__name__ if category else None | |
./warnings.py: name = type(self).__name__ | |
./http/cookies.py: return '<%s: %s=%s>' % (self.__class__.__name__, | |
./http/cookies.py: return '<%s: %s>' % (self.__class__.__name__, _spacejoin(l)) | |
./http/client.py: super(HTTPSConnection, self).__init__(host, port, timeout, | |
./http/client.py: # Subclasses that define an __init__ must call Exception.__init__ | |
./http/client.py: HTTPException.__init__(self, "got more than %d bytes when reading %s" | |
./http/cookiejar.py: return "<%s[%s]>" % (self.__class__.__name__, ", ".join(r)) | |
./http/cookiejar.py: return "<%s[%s]>" % (self.__class__.__name__, ", ".join(r)) | |
./http/cookiejar.py: CookieJar.__init__(self, policy) | |
./doctest.py: pdb.Pdb.__init__(self, stdout=out, nosigint=True) | |
./doctest.py: elif module.__name__ == '__main__': | |
./doctest.py: "when obj.__name__ doesn't exist: %r" % | |
./doctest.py: return module.__name__ == obj_mod | |
./doctest.py: return module.__name__ == object.__module__ | |
./doctest.py: return module.__name__ == object.__module__ | |
./doctest.py: filename = getattr(module, '__file__', module.__name__) | |
./doctest.py: _TestClass.__init__ -> TestResults(failed=0, attempted=2) | |
./doctest.py: 2 tests in _TestClass.__init__ | |
./doctest.py: use m.__name__. | |
./doctest.py: name = m.__name__ | |
./doctest.py: unittest.TestCase.__init__(self) | |
./doctest.py: DocTestCase.__init__(self, None) | |
./doctest.py: return "Skipping tests from %s" % self.module.__name__ | |
./datetime.py: type(x).__name__, type(y).__name__)) | |
./datetime.py: self = object.__new__(cls) | |
./datetime.py: return "%s(%d, %d, %d)" % ('datetime.' + self.__class__.__name__, | |
./datetime.py: return "%s(%d, %d)" % ('datetime.' + self.__class__.__name__, | |
./datetime.py: return "%s(%d)" % ('datetime.' + self.__class__.__name__, self._days) | |
./datetime.py: return (self.__class__, self._getstate()) | |
./datetime.py: self = object.__new__(cls) | |
./datetime.py: self = object.__new__(cls) | |
./datetime.py: return "%s(%d, %d, %d)" % ('datetime.' + self.__class__.__name__, | |
./datetime.py: return (self.__class__, self._getstate()) | |
./datetime.py: return (self.__class__, args) | |
./datetime.py: return (self.__class__, args, state) | |
./datetime.py: self = object.__new__(cls) | |
./datetime.py: s= "%s(%d, %d%s)" % ('datetime.' + self.__class__.__name__, | |
./datetime.py: self = date.__new__(cls, year[:4]) | |
./datetime.py: self = date.__new__(cls, year, month, day) | |
./datetime.py: s = "%s(%s)" % ('datetime.' + self.__class__.__name__, s) | |
./datetime.py: return (self.__class__, self._getstate()) | |
./datetime.py: self = tzinfo.__new__(cls) | |
./datetime.py: return "%s(%r)" % ('datetime.' + self.__class__.__name__, | |
./datetime.py: return "%s(%r, %r)" % ('datetime.' + self.__class__.__name__, | |
./urllib/error.py: __super_init = urllib.response.addinfourl.__init__ | |
./urllib/error.py: URLError.__init__(self, message) | |
./urllib/request.py: AbstractHTTPHandler.__init__(self, debuglevel) | |
./urllib/request.py: "Use newer urlopen functions/methods" % {'class': self.__class__.__name__} | |
./urllib/request.py: URLopener.__init__(self, *args, **kwargs) | |
./urllib/response.py: super(addbase, self).__init__(fp, '<urllib response>', delete=False) | |
./urllib/response.py: return '<%s at %r whose fp = %r>' % (self.__class__.__name__, | |
./urllib/response.py: super(addclosehook, self).__init__(fp) | |
./urllib/response.py: super(addinfo, self).__init__(fp) | |
./urllib/response.py: super(addinfourl, self).__init__(fp, headers) | |
./mimetypes.py: inited = True # so that MimeTypes.__init__() doesn't call us again | |
./difflib.py: filter out line and character 'junk'. See Differ.__init__ for details. | |
./codecs.py: self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter)) | |
./codecs.py: (self.__class__.__module__, self.__class__.__name__, | |
./codecs.py: IncrementalEncoder.__init__(self, errors) | |
./codecs.py: IncrementalDecoder.__init__(self, errors) | |
./asynchat.py: asyncore.dispatcher.__init__(self, sock, map) | |
./pprint.py: write(typ.__name__) | |
./pprint.py: indent += len(typ.__name__) + 1 | |
./pprint.py: % (type(object).__name__, id(object))) | |
./contextlib.py: return self.__class__(self.func, self.args, self.kwds) | |
./getopt.py: Exception.__init__(self, msg, opt) | |
./compileall.py: print(e.__class__.__name__ + ':', e) | |
./pydoc.py: name = object.__name__ | |
./pydoc.py: exc = self.exc.__name__ | |
./pydoc.py: name and ' ' + repr(name), type(object).__name__) | |
./pydoc.py: (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', | |
./pydoc.py: object.__name__ not in ('xml.etree', 'test.pydoc_mod')): | |
./pydoc.py: docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__) | |
./pydoc.py: docloc = os.path.join(docloc, object.__name__ + ".html") | |
./pydoc.py: Repr.__init__(self) | |
./pydoc.py: methodname = 'repr_' + '_'.join(type(x).__name__.split()) | |
./pydoc.py: return self.escape('<%s instance>' % x.__class__.__name__) | |
./pydoc.py: name, module = object.__name__, sys.modules.get(object.__module__) | |
./pydoc.py: module.__name__, name, classname(object, modname)) | |
./pydoc.py: return '<a href="%s.html">%s</a>' % (object.__name__, object.__name__) | |
./pydoc.py: name = object.__name__ # ignore the passed-in name | |
./pydoc.py: key, modname = base.__name__, base.__module__ | |
./pydoc.py: realname = object.__name__ | |
./pydoc.py: realname = object.__name__ | |
./pydoc.py: anchor = (cl and cl.__name__ or '') + '-' + name | |
./pydoc.py: imclass = object.__self__.__class__ | |
./pydoc.py: object.__self__.__class__, mod) | |
./pydoc.py: cl.__name__ + '-' + realname, realname) | |
./pydoc.py: Repr.__init__(self) | |
./pydoc.py: methodname = 'repr_' + '_'.join(type(x).__name__.split()) | |
./pydoc.py: return '<%s instance>' % x.__class__.__name__ | |
./pydoc.py: name = object.__name__ # ignore the passed-in name | |
./pydoc.py: if value.__name__.startswith(name + '.') and key not in modpkgs_names: | |
./pydoc.py: realname = object.__name__ | |
./pydoc.py: realname = object.__name__ | |
./pydoc.py: imclass = object.__self__.__class__ | |
./pydoc.py: object.__self__.__class__, mod) | |
./pydoc.py: if thing.__name__ in sys.builtin_module_names: | |
./pydoc.py: return 'built-in module ' + thing.__name__ | |
./pydoc.py: return 'package ' + thing.__name__ | |
./pydoc.py: return 'module ' + thing.__name__ | |
./pydoc.py: return 'built-in function ' + thing.__name__ | |
./pydoc.py: thing.__objclass__.__module__, thing.__objclass__.__name__, | |
./pydoc.py: thing.__name__) | |
./pydoc.py: thing.__objclass__.__module__, thing.__objclass__.__name__, | |
./pydoc.py: thing.__name__) | |
./pydoc.py: return 'class ' + thing.__name__ | |
./pydoc.py: return 'function ' + thing.__name__ | |
./pydoc.py: return 'method ' + thing.__name__ | |
./pydoc.py: return type(thing).__name__ | |
./pydoc.py: desc += ' in module ' + module.__name__ | |
./pydoc.py: if modname and modname[-9:] == '.__init__': | |
./pydoc.py: if modname[-9:] == '.__init__': | |
./pydoc.py: self.base.__init__(self, self.address, self.handler) | |
./pydoc.py: threading.Thread.__init__(self) | |
./pydoc.py: if modname[-9:] == '.__init__': | |
./py_compile.py: exc_type_name = exc_type.__name__ | |
./py_compile.py: Exception.__init__(self,msg or errmsg,exc_type_name,exc_value,file) | |
./py_compile.py: py_exc = PyCompileError(err.__class__, err, dfile or file) | |
./operator.py: msg = "'%s' object can't be concatenated" % type(a).__name__ | |
./operator.py: type(default).__name__) | |
./operator.py: type(val).__name__) | |
./operator.py: msg = "'%s' object can't be concatenated" % type(a).__name__ | |
./socket.py: _socket.socket.__init__(self, family, type, proto, fileno) | |
./socket.py: % (self.__class__.__module__, | |
./socket.py: self.__class__.__name__, | |
./socket.py: sock = self.__class__(self.family, self.type, self.proto, fileno=fd) | |
./socket.py: io.RawIOBase.__init__(self) | |
./tarfile.py: super().__init__(fileobj) | |
./tarfile.py: return "<%s %r at %#x>" % (self.__class__.__name__,self.name,id(self)) | |
./tarfile.py: raise OSError("%s is closed" % self.__class__.__name__) | |
./_threading_local.py: self.__init__(*args, **kw) | |
./_threading_local.py: if (args or kw) and (cls.__init__ is object.__init__): | |
./_threading_local.py: self = object.__new__(cls) | |
./_threading_local.py: % self.__class__.__name__) | |
./_threading_local.py: % self.__class__.__name__) | |
./_pyio.py: (self.__class__.__name__, name)) | |
./_pyio.py: .format(self.__class__.__name__)) | |
./_pyio.py: clsname = self.__class__.__name__ | |
./_pyio.py: _BufferedIOMixin.__init__(self, raw) | |
./_pyio.py: _BufferedIOMixin.__init__(self, raw) | |
./_pyio.py: BufferedReader.__init__(self, raw, buffer_size) | |
./_pyio.py: BufferedWriter.__init__(self, raw, buffer_size) | |
./_pyio.py: codecs.IncrementalDecoder.__init__(self, errors=errors) | |
./_pyio.py: s.__class__.__name__) | |
./_pyio.py: super(StringIO, self).__init__(BytesIO(), | |
./_pyio.py: .format(type(initial_value).__name__)) | |
./copyreg.py: obj = object.__new__(cls) | |
./copyreg.py: obj = base.__new__(cls, state) | |
./copyreg.py: if base.__init__ != object.__init__: | |
./copyreg.py: base.__init__(obj, state) | |
./copyreg.py: for base in self.__class__.__mro__: | |
./copyreg.py: if base is self.__class__: | |
./copyreg.py: raise TypeError("can't pickle %s objects" % base.__name__) | |
./copyreg.py: args = (self.__class__, base, state) | |
./copyreg.py: return cls.__new__(cls, *args) | |
./copyreg.py: return cls.__new__(cls, *args, **kwargs) | |
./copyreg.py: names.append('_%s%s' % (c.__name__, name)) | |
./formatter.py: NullWriter.__init__(self) | |
./inspect.py: os.path.realpath(f)] = module.__name__ | |
./inspect.py: if hasattr(main, object.__name__): | |
./inspect.py: mainobject = getattr(main, object.__name__) | |
./inspect.py: if hasattr(builtin, object.__name__): | |
./inspect.py: builtinobject = getattr(builtin, object.__name__) | |
./inspect.py: name = object.__name__ | |
./inspect.py: return annotation.__name__ | |
./inspect.py: return annotation.__module__+'.'+annotation.__name__ | |
./inspect.py: f_name = func.__name__ | |
./inspect.py: class_dict.__name__ == "__dict__" and | |
./inspect.py: # object.__init__ or type.__init__. | |
./inspect.py: if obj.__init__ is object.__init__: | |
./inspect.py: obj = int.__new__(self, *args) | |
./inspect.py: return '<{} at {:#x} {!r}>'.format(self.__class__.__name__, | |
./inspect.py: type(exc).__name__, | |
./inspect.py: if module.__name__ in sys.builtin_module_names: | |
./_strptime.py: base.__init__({ | |
./random.py: return self.__class__, (), self.getstate() | |
./random.py: print(n, 'times', func.__name__) | |
./cgi.py: % type(outerboundary).__name__) | |
./cgi.py: % (self.fp, type(qs).__name__)) | |
./cgi.py: klass = self.FieldStorageClass or self.__class__ | |
./cgi.py: % (self.fp, type(first_line).__name__)) | |
./cgi.py: % (self.fp, type(data).__name__)) | |
./selectors.py: super().__init__() | |
./selectors.py: super().__init__() | |
./selectors.py: super().__init__() | |
./selectors.py: super().__init__() | |
./statistics.py: raise TypeError(msg % (T.__name__, S.__name__)) | |
./statistics.py: raise TypeError(msg.format(type(x).__name__)) | |
./asyncio/unix_events.py: super().__init__(selector) | |
./asyncio/unix_events.py: super().__init__(extra) | |
./asyncio/unix_events.py: info = [self.__class__.__name__] | |
./asyncio/unix_events.py: super().__init__(extra, loop) | |
./asyncio/unix_events.py: info = [self.__class__.__name__] | |
./asyncio/unix_events.py: super().__init__() | |
./asyncio/unix_events.py: super().__init__() | |
./asyncio/unix_events.py: super().__init__() | |
./asyncio/sslproto.py: .format(type(data).__name__)) | |
./asyncio/subprocess.py: super().__init__(loop=loop) | |
./asyncio/subprocess.py: info = [self.__class__.__name__] | |
./asyncio/subprocess.py: return '<%s %s>' % (self.__class__.__name__, self.pid) | |
./asyncio/base_events.py: return '<%s sockets=%r>' % (self.__class__.__name__, self.sockets) | |
./asyncio/base_events.py: % (self.__class__.__name__, self.is_running(), | |
./asyncio/base_events.py: % type(arg).__name__) | |
./asyncio/locks.py: super().__init__(value, loop=loop) | |
./asyncio/queues.py: type(self).__name__, id(self), self._format()) | |
./asyncio/queues.py: return '<{} {}>'.format(type(self).__name__, self._format()) | |
./asyncio/windows_utils.py: return '<%s %s>' % (self.__class__.__name__, handle) | |
./asyncio/windows_utils.py: super().__init__(args, stdin=stdin_rfd, stdout=stdout_wfd, | |
./asyncio/futures.py: self.tb = traceback.format_exception(exc.__class__, exc, | |
./asyncio/futures.py: return '<%s %s>' % (self.__class__.__name__, ' '.join(info)) | |
./asyncio/futures.py: % self.__class__.__name__), | |
./asyncio/transports.py: The subclass constructor must call super().__init__(extra). This | |
./asyncio/transports.py: super().__init__(extra) | |
./asyncio/windows_events.py: super().__init__(loop=loop) | |
./asyncio/windows_events.py: super().__init__(loop=loop) | |
./asyncio/windows_events.py: super().__init__(ov, event, wait_handle, loop=loop) | |
./asyncio/windows_events.py: super().__init__(ov, handle, wait_handle, loop=loop) | |
./asyncio/windows_events.py: super().__init__(proactor) | |
./asyncio/windows_events.py: % (self.__class__.__name__, len(self._cache), | |
./asyncio/base_subprocess.py: super().__init__(extra) | |
./asyncio/base_subprocess.py: info = [self.__class__.__name__] | |
./asyncio/base_subprocess.py: % (self.__class__.__name__, self.fd, self.pipe)) | |
./asyncio/proactor_events.py: super().__init__(extra, loop) | |
./asyncio/proactor_events.py: info = [self.__class__.__name__] | |
./asyncio/proactor_events.py: super().__init__(loop, sock, protocol, waiter, extra, server) | |
./asyncio/proactor_events.py: super().__init__(*args, **kw) | |
./asyncio/proactor_events.py: super().__init__() | |
./asyncio/proactor_events.py: logger.debug('Using proactor: %s', proactor.__class__.__name__) | |
./asyncio/events.py: info = [self.__class__.__name__] | |
./asyncio/events.py: super().__init__(callback, args, loop) | |
./asyncio/streams.py: super().__init__("%d bytes read on a total of %r expected bytes" | |
./asyncio/streams.py: super().__init__(message) | |
./asyncio/streams.py: super().__init__(loop=loop) | |
./asyncio/streams.py: info = [self.__class__.__name__, 'transport=%r' % self._transport] | |
./asyncio/tasks.py: super().__init__(loop=loop) | |
./asyncio/tasks.py: self.__class__._all_tasks.add(self) | |
./asyncio/tasks.py: for line in traceback.format_exception_only(exc.__class__, exc): | |
./asyncio/tasks.py: self.__class__._current_tasks[self._loop] = self | |
./asyncio/tasks.py: self.__class__._current_tasks.pop(self._loop) | |
./asyncio/tasks.py: raise TypeError("expect a list of futures, not %s" % type(fs).__name__) | |
./asyncio/tasks.py: raise TypeError("expect a list of futures, not %s" % type(fs).__name__) | |
./asyncio/tasks.py: super().__init__(loop=loop) | |
./asyncio/test_utils.py: super().__init__() | |
./asyncio/coroutines.py: self.__name__ = getattr(gen, '__name__', None) | |
./asyncio/coroutines.py: return '<%s %s>' % (self.__class__.__name__, coro_repr) | |
./asyncio/coroutines.py: w.__name__ = getattr(func, '__name__', None) | |
./asyncio/selector_events.py: super().__init__() | |
./asyncio/selector_events.py: logger.debug('Using selector: %s', selector.__class__.__name__) | |
./asyncio/selector_events.py: super().__init__(extra, loop) | |
./asyncio/selector_events.py: info = [self.__class__.__name__] | |
./asyncio/selector_events.py: super().__init__(loop, sock, protocol, extra, server) | |
./asyncio/selector_events.py: super().__init__(loop, sslsock, protocol, extra, server) | |
./asyncio/selector_events.py: super().__init__(loop, sock, protocol, extra) | |
./idlelib/ToolTip.py: ToolTipBase.__init__(self, button) | |
./idlelib/ToolTip.py: ToolTipBase.__init__(self, button) | |
./idlelib/OutputWindow.py: EditorWindow.__init__(self, *args) | |
./idlelib/WidgetRedirector.py: return "WidgetRedirector(%s<%s>)" % (self.widget.__class__.__name__, | |
./idlelib/WidgetRedirector.py: "Unregister operations and revert redirection created by .__init__." | |
./idlelib/TreeWidget.py: child = self.__class__(self.canvas, self, item) | |
./idlelib/idle_test/htest.py:or function) whose .__name__ attrubute is also X (the usual situation). | |
./idlelib/idle_test/htest.py:following template, with X.__name__ prepended to '_spec'. | |
./idlelib/idle_test/htest.py: test_spec = globals()[test.__name__ + '_spec'] | |
./idlelib/idle_test/htest.py: test_spec['name'] = test.__name__ | |
./idlelib/idle_test/test_calltips.py: gtest(list.__new__, | |
./idlelib/idle_test/test_calltips.py: gtest(list.__init__, | |
./idlelib/idle_test/test_autoexpand.py: # AutoExpand.__init__ only needs .text | |
./idlelib/idle_test/README.txt:The idle tests are 'discovered' by idlelib.idle_test.__init__.load_tests, | |
./idlelib/idle_test/test_textview.py: TV.transient.__init__() | |
./idlelib/idle_test/test_textview.py: TV.grab_set.__init__() | |
./idlelib/idle_test/test_textview.py: TV.wait_window.__init__() | |
./idlelib/idle_test/test_io.py: return '%s:str' % type(self).__name__ | |
./idlelib/idle_test/test_io.py: return '%s:unicode' % type(self).__name__ | |
./idlelib/idle_test/test_io.py: return '%s:item' % type(self).__name__ | |
./idlelib/idle_test/test_io.py: return '%s:slice' % type(self).__name__ | |
./idlelib/idle_test/test_idlehistory.py: '''Tests History.__init__ and History.store with mock Text''' | |
./idlelib/idle_test/test_warning.py:running_in_idle = 'idle' in showwarning.__name__ | |
./idlelib/idle_test/test_widgetredir.py: self.func.__init__(True) | |
./idlelib/idle_test/test_widgetredir.py: self.func.__init__(TclError()) | |
./idlelib/idle_test/test_widgetredir.py: # Test that .__init__ causes redirection of tk calls | |
./idlelib/idle_test/test_widgetredir.py: self.func.__init__(TclError()) | |
./idlelib/idle_test/test_grep.py: '''GrepDialog.__init__ calls parent SearchDiabolBase which attaches the | |
./idlelib/WindowList.py: Toplevel.__init__(self, master, kw) | |
./idlelib/configHandler.py: ConfigParser.__init__(self, defaults=cfgDefaults, strict=False) | |
./idlelib/MultiCall.py: widget.__init__(self, *args, **kwargs) | |
./idlelib/aboutDialog.py: Toplevel.__init__(self, parent) | |
./idlelib/UndoDelegator.py: Delegator.__init__(self) | |
./idlelib/UndoDelegator.py: s = self.__class__.__name__ | |
./idlelib/UndoDelegator.py: Command.__init__(self, index1, None, chars, tags) | |
./idlelib/UndoDelegator.py: if self.__class__ is not cmd.__class__: | |
./idlelib/UndoDelegator.py: Command.__init__(self, index1, index2, None, None) | |
./idlelib/UndoDelegator.py: s = self.__class__.__name__ | |
./idlelib/textView.py: Toplevel.__init__(self, parent) | |
./idlelib/MultiStatusBar.py: Frame.__init__(self, master, **kw) | |
./idlelib/help.py: HTMLParser.__init__(self, convert_charrefs=True) | |
./idlelib/help.py: Text.__init__(self, parent, wrap='word', highlightthickness=0, | |
./idlelib/help.py: Frame.__init__(self, parent) | |
./idlelib/help.py: Toplevel.__init__(self, parent) | |
./idlelib/tabbedpages.py: Frame.__init__(self, page_set, **kw) | |
./idlelib/tabbedpages.py: Frame.__init__(self, tab_row, borderwidth=self.bw, relief=RAISED) | |
./idlelib/tabbedpages.py: super(TabbedPageSet.PageLift, self).__init__(page_set) | |
./idlelib/tabbedpages.py: Frame.__init__(self, parent, **kw) | |
./idlelib/ColorDelegator.py: Delegator.__init__(self) | |
./idlelib/ReplaceDialog.py: SearchDialogBase.__init__(self, root, engine) | |
./idlelib/NEWS.txt: Use idleib.idle.* to start Idle. See idlelib.__init__.__doc__. | |
./idlelib/keybindingDialog.py: Toplevel.__init__(self, parent) | |
./idlelib/Percolator.py: Delegator.__init__(self, None) | |
./idlelib/rpc.py: socketserver.TCPServer.__init__(self, addr, handlerclass) | |
./idlelib/rpc.py: SocketIO.__init__(self, sock) | |
./idlelib/rpc.py: socketserver.BaseRequestHandler.__init__(self, sock, addr, svr) | |
./idlelib/rpc.py: SocketIO.__init__(self, working_sock) | |
./idlelib/configDialog.py: Toplevel.__init__(self, parent) | |
./idlelib/configDialog.py: Frame.__init__(self, parent, *args, **kw) | |
./idlelib/GrepDialog.py: SearchDialogBase.__init__(self, root, engine) | |
./idlelib/StackViewer.py: type = type.__name__ | |
./idlelib/EditorWindow.py: if not (self.__class__.__name__ == 'PyShellEditorWindow' | |
./idlelib/CallTips.py: Delete 'self' parameter for classes (.__init__) and bound methods. | |
./idlelib/CallTips.py: fob = ob.__init__ | |
./idlelib/PyShell.py: s += "%s: %s\n" % (category.__name__, message) | |
./idlelib/PyShell.py: EditorWindow.__init__(self, *args) | |
./idlelib/PyShell.py: ColorDelegator.__init__(self) | |
./idlelib/PyShell.py: InteractiveInterpreter.__init__(self, locals=locals) | |
./idlelib/PyShell.py: OutputWindow.__init__(self, flist, None, None) | |
./idlelib/PyShell.py: raise TypeError('must be str, not ' + type(s).__name__) | |
./idlelib/PyShell.py: PseudoFile.__init__(self, shell, tags, encoding) | |
./idlelib/PyShell.py: raise TypeError('must be int, not ' + type(size).__name__) | |
./idlelib/PyShell.py: raise TypeError('must be int, not ' + type(size).__name__) | |
./idlelib/Debugger.py: bdb.Bdb.__init__(self) | |
./idlelib/Debugger.py: self.__class__.vstack = BooleanVar(top) | |
./idlelib/Debugger.py: self.__class__.vsource = BooleanVar(top) | |
./idlelib/Debugger.py: self.__class__.vlocals = BooleanVar(top) | |
./idlelib/Debugger.py: self.__class__.vglobals = BooleanVar(top) | |
./idlelib/Debugger.py: m1 = type.__name__ | |
./idlelib/Debugger.py: ScrolledList.__init__(self, master) | |
./idlelib/Debugger.py: ScrolledList.__init__(self, master, width=80) | |
./idlelib/configHelpSourceEdit.py: Toplevel.__init__(self, parent) | |
./idlelib/dynOptionMenuWidget.py: OptionMenu.__init__(self, master, variable, value, *values, **kwargs) | |
./idlelib/configSectionNameDialog.py: Toplevel.__init__(self, parent) | |
./_weakrefset.py: return (self.__class__, (list(self),), | |
./_weakrefset.py: return self.__class__(self) | |
./_weakrefset.py: return self.__class__(item for item in other if item in self) | |
./_weakrefset.py: if not isinstance(other, self.__class__): | |
./_weakrefset.py: return self.__class__(e for s in (self, other) for e in s) | |
./rlcompleter.py: words.update(get_class_members(thisobject.__class__)) | |
./argparse.py: type_name = type(self).__name__ | |
./argparse.py: params[name] = params[name].__name__ | |
./argparse.py: return action.type.__name__ | |
./argparse.py: return action.type.__name__ | |
./argparse.py: super(_StoreAction, self).__init__( | |
./argparse.py: super(_StoreConstAction, self).__init__( | |
./argparse.py: super(_StoreTrueAction, self).__init__( | |
./argparse.py: super(_StoreFalseAction, self).__init__( | |
./argparse.py: super(_AppendAction, self).__init__( | |
./argparse.py: super(_AppendConstAction, self).__init__( | |
./argparse.py: super(_CountAction, self).__init__( | |
./argparse.py: super(_HelpAction, self).__init__( | |
./argparse.py: super(_VersionAction, self).__init__( | |
./argparse.py: sup.__init__(option_strings=[], dest=dest, help=help, | |
./argparse.py: super(_SubParsersAction, self).__init__( | |
./argparse.py: return '%s(%s)' % (type(self).__name__, args_str) | |
./argparse.py: super(_ActionsContainer, self).__init__() | |
./argparse.py: super_init = super(_ArgumentGroup, self).__init__ | |
./argparse.py: super(_MutuallyExclusiveGroup, self).__init__(container) | |
./argparse.py: superinit = super(ArgumentParser, self).__init__ | |
./plistlib.py: super().__init__(**kwargs) | |
./plistlib.py: super().__init__(**kwargs) | |
./plistlib.py: if isinstance(other, self.__class__): | |
./plistlib.py: return "%s(%s)" % (self.__class__.__name__, repr(self.data)) | |
./plistlib.py: _DumbXMLWriter.__init__(self, file, indent_level, indent) | |
./plistlib.py: ValueError.__init__(self, message) | |
./xml/sax/expatreader.py: xmlreader.IncrementalParser.__init__(self, bufsize) | |
./xml/sax/xmlreader.py: XMLReader.__init__(self) | |
./xml/sax/xmlreader.py: return self.__class__(self._attrs) | |
./xml/sax/xmlreader.py: return self.__class__(self._attrs, self._qnames) | |
./xml/sax/_exceptions.py: Exception.__init__(self, msg) | |
./xml/sax/_exceptions.py: SAXException.__init__(self, msg, exception) | |
./xml/sax/saxutils.py: __class__ = out.__class__ | |
./xml/sax/saxutils.py: handler.ContentHandler.__init__(self) | |
./xml/sax/saxutils.py: xmlreader.XMLReader.__init__(self) | |
./xml/dom/minidom.py: Node.__init__(self) | |
./xml/dom/minidom.py: self.__class__.__name__, data[0:10], dotdotdot) | |
./xml/dom/minidom.py: newText = self.__class__() | |
./xml/dom/minidom.py: CharacterData.__init__(self) | |
./xml/dom/expatbuilder.py: FilterCrutch.__init__(self, builder) | |
./xml/dom/expatbuilder.py: ExpatBuilder.__init__(self, options) | |
./xml/dom/__init__.py: if self.__class__ is DOMException: | |
./xml/dom/__init__.py: Exception.__init__(self, *args, **kw) | |
./xml/etree/ElementTree.py: attrib.__class__.__name__,)) | |
./xml/etree/ElementTree.py: return self.__class__(tag, attrib) | |
./xml/etree/ElementTree.py: raise TypeError('expected an Element, not %s' % type(e).__name__) | |
./xml/etree/ElementTree.py: "cannot serialize %r (type %s)" % (text, type(text).__name__) | |
./pickle.py:NEWOBJ = b'\x81' # build object by applying cls.__new__ to argtuple | |
./pickle.py: raise PicklingError("Pickler.__init__() was not called by " | |
./pickle.py: "%s.__init__()" % (self.__class__.__name__,)) | |
./pickle.py: (t.__name__, obj)) | |
./pickle.py: if obj is not None and cls is not obj.__class__: | |
./pickle.py: # return cls.__new__(cls, *args) | |
./pickle.py: # which calls cls.__new__(cls, *args) at unpickling time | |
./pickle.py: if obj is not None and cls is not obj.__class__: | |
./pickle.py: name = obj.__name__ | |
./pickle.py: raise UnpicklingError("Unpickler.__init__() was not called by " | |
./pickle.py: "%s.__init__()" % (self.__class__.__name__,)) | |
./pickle.py: # object, following which are the arguments for klass.__init__. | |
./pickle.py: (klass.__name__, str(err)), sys.exc_info()[2]) | |
./pickle.py: value = klass.__new__(klass) | |
./pickle.py: obj = cls.__new__(cls, *args) | |
./pickle.py: obj = cls.__new__(cls, *args, **kwargs) | |
./cgitb.py: etype = etype.__name__ | |
./cgitb.py: etype = etype.__name__ | |
./xmlrpc/client.py: Error.__init__(self) | |
./xmlrpc/client.py: Error.__init__(self) | |
./xmlrpc/client.py: and other.__class__.__name__ | |
./xmlrpc/client.py: (self.__class__.__name__, otype)) | |
./xmlrpc/client.py: data.__class__.__name__) | |
./xmlrpc/client.py: if value.__class__ in WRAPPERS: | |
./xmlrpc/client.py: gzip.GzipFile.__init__(self, mode="rb", fileobj=self.io) | |
./xmlrpc/client.py: super().__init__(use_datetime=use_datetime, use_builtin_types=use_builtin_types) | |
./xmlrpc/server.py: name = function.__name__ | |
./xmlrpc/server.py: SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding, use_builtin_types) | |
./xmlrpc/server.py: socketserver.TCPServer.__init__(self, addr, requestHandler, bind_and_activate) | |
./xmlrpc/server.py: SimpleXMLRPCServer.__init__(self, addr, requestHandler, logRequests, allow_none, | |
./xmlrpc/server.py: SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding, use_builtin_types) | |
./xmlrpc/server.py: anchor = (cl and cl.__name__ or '') + '-' + name | |
./xmlrpc/server.py: SimpleXMLRPCServer.__init__(self, addr, requestHandler, logRequests, | |
./xmlrpc/server.py: XMLRPCDocGenerator.__init__(self) | |
./xmlrpc/server.py: CGIXMLRPCRequestHandler.__init__(self) | |
./xmlrpc/server.py: XMLRPCDocGenerator.__init__(self) | |
./pickletools.py: and the value returned by cls.__new__(cls, *args) is pushed back | |
./pickletools.py: cls.__new__(cls, *args, *kwargs) is pushed back onto the stack. | |
./lib2to3/pgen2/grammar.py: new = self.__class__() | |
./lib2to3/pgen2/parse.py: Exception.__init__(self, "%s: type=%r, value=%r, context=%r" % | |
./lib2to3/refactor.py: name, err.__class__.__name__, err) | |
./lib2to3/refactor.py: filename, lineno, err.__class__.__name__, err) | |
./lib2to3/refactor.py: super(MultiprocessRefactoringTool, self).__init__(*args, **kwargs) | |
./lib2to3/pytree.py: return object.__new__(cls) | |
./lib2to3/pytree.py: if self.__class__ is not other.__class__: | |
./lib2to3/pytree.py: return "%s(%s, %r)" % (self.__class__.__name__, | |
./lib2to3/pytree.py: return "%s(%r, %r)" % (self.__class__.__name__, | |
./lib2to3/pytree.py: return object.__new__(cls) | |
./lib2to3/pytree.py: return "%s(%s)" % (self.__class__.__name__, ", ".join(map(repr, args))) | |
./lib2to3/tests/test_fixers.py: if post and post[-1].__class__.__module__.endswith(n): | |
./lib2to3/tests/test_fixers.py: if pre and pre[-1].__class__.__module__.endswith(n) and not post: | |
./lib2to3/tests/test_fixers.py: %(", ".join([x.__class__.__module__ for x in (pre+post)]), n)) | |
./lib2to3/tests/test_fixers.py: a = "a.__self__.__class__" | |
./lib2to3/tests/test_fixers.py: a = "self.foo.__self__.__class__.foo_bar" | |
./lib2to3/tests/test_fixers.py: a = """type(x).__name__""" | |
./lib2to3/main.py: super(StdoutRefactoringTool, self).__init__(fixers, options, explicit) | |
./lib2to3/fixes/fix_methodattrs.py: "im_class" : "__self__.__class__" | |
./lib2to3/fixes/fix_exitfunc.py: super(FixExitfunc, self).__init__(*args) | |
./ssl.py: return super().__new__(cls, *_txt2obj(oid, name=False)) | |
./ssl.py: return super().__new__(cls, *_nid2obj(nid)) | |
./ssl.py: return super().__new__(cls, *_txt2obj(name, name=True)) | |
./ssl.py: self = _SSLContext.__new__(cls, protocol) | |
./ssl.py: socket.__init__(self, | |
./ssl.py: socket.__init__(self, fileno=fileno) | |
./ssl.py: socket.__init__(self, family=family, type=type, proto=proto) | |
./ssl.py: self.__class__.__name__) | |
./ssl.py: self.__class__) | |
./ssl.py: self.__class__) | |
./ssl.py: self.__class__) | |
./ssl.py: self.__class__) | |
./ssl.py: self.__class__) | |
./ssl.py: self.__class__) | |
./ssl.py: self.__class__) | |
./ssl.py: self.__class__) | |
./ssl.py: self.__class__) | |
./ssl.py: "%s" % self.__class__) | |
./abc.py: super().__init__(callable) | |
./abc.py: super().__init__(callable) | |
./abc.py: cls = super().__new__(mcls, name, bases, namespace) | |
./abc.py: print("Class: %s.%s" % (cls.__module__, cls.__name__), file=file) | |
./abc.py: subclass = instance.__class__ | |
./zipfile.py: ZipFile.__init__(self, file, mode=mode, compression=compression, | |
./cmd.py: return dir(self.__class__) | |
./importlib/util.py: module.__package__ = module.__name__ | |
./importlib/abc.py: frozen_cls = getattr(_frozen_importlib, cls.__name__) | |
./importlib/_bootstrap.py: # We could use module.__class__.__name__ instead of 'module' in the | |
./importlib/_bootstrap.py: name = module.__name__ | |
./importlib/_bootstrap.py: return '{}({})'.format(self.__class__.__name__, ', '.join(args)) | |
./importlib/_bootstrap.py: name = module.__name__ | |
./importlib/_bootstrap.py: spec.name -> module.__name__ | |
./importlib/_bootstrap.py: module.__name__ = spec.name | |
./importlib/_bootstrap.py: loader = _NamespaceLoader.__new__(_NamespaceLoader) | |
./importlib/_bootstrap.py: module.__package__ = module.__name__ | |
./importlib/_bootstrap.py: return '<module {!r} (built-in)>'.format(module.__name__) | |
./importlib/_bootstrap.py: return '<module {!r} (frozen)>'.format(m.__name__) | |
./importlib/_bootstrap.py: code = self.get_code(module.__name__) | |
./importlib/_bootstrap.py: 'returns None'.format(module.__name__)) | |
./importlib/_bootstrap.py: return (self.__class__ == other.__class__ and | |
./importlib/_bootstrap.py: return (self.__class__ == other.__class__ and | |
./importlib/_bootstrap.py: module.__package__ = module.__name__ | |
./importlib/_bootstrap.py: return '<module {!r} (namespace)>'.format(module.__name__) | |
./importlib/_bootstrap.py: from_name = '{}.{}'.format(module.__name__, x) | |
./importlib/_bootstrap.py: return sys.modules[module.__name__[:len(module.__name__)-cut_off]] | |
./importlib/_bootstrap.py: if _os.__name__ == 'nt': | |
./importlib/__init__.py: _bootstrap.__name__ = 'importlib._bootstrap' | |
./importlib/__init__.py: name = module.__name__ | |
./collections/__main__.py: _make = classmethod(tuple.__new__) | |
./collections/__init__.py: return '%s()' % (self.__class__.__name__,) | |
./collections/__init__.py: return '%s(%r)' % (self.__class__.__name__, list(self.items())) | |
./collections/__init__.py: return self.__class__, (), inst_dict or None, None, iter(self.items()) | |
./collections/__init__.py: return self.__class__(self) | |
./collections/__init__.py: return _tuple.__new__(_cls, ({arg_list})) | |
./collections/__init__.py: def _make(cls, iterable, new=tuple.__new__, len=len): | |
./collections/__init__.py: return self.__class__.__name__ + '({repr_fmt})' % self | |
./collections/__init__.py: super(Counter, self).__init__() | |
./collections/__init__.py: return self.__class__(self) | |
./collections/__init__.py: return self.__class__, (dict(self),) | |
./collections/__init__.py: return '%s()' % self.__class__.__name__ | |
./collections/__init__.py: return '%s({%s})' % (self.__class__.__name__, items) | |
./collections/__init__.py: return '{0}({1!r})'.format(self.__class__.__name__, dict(self)) | |
./collections/__init__.py: return '{0.__class__.__name__}({1})'.format( | |
./collections/__init__.py: return self.__class__(self.maps[0].copy(), *self.maps[1:]) | |
./collections/__init__.py: return self.__class__(m, *self.maps) | |
./collections/__init__.py: return self.__class__(*self.maps[1:]) | |
./collections/__init__.py: if hasattr(self.__class__, "__missing__"): | |
./collections/__init__.py: return self.__class__.__missing__(self, key) | |
./collections/__init__.py: if self.__class__ is UserDict: | |
./collections/__init__.py: return self.__class__(self.data + other.data) | |
./collections/__init__.py: return self.__class__(self.data + other) | |
./collections/__init__.py: return self.__class__(self.data + list(other)) | |
./collections/__init__.py: return self.__class__(other.data + self.data) | |
./collections/__init__.py: return self.__class__(other + self.data) | |
./collections/__init__.py: return self.__class__(list(other) + self.data) | |
./collections/__init__.py: return self.__class__(self.data*n) | |
./collections/__init__.py: def copy(self): return self.__class__(self) | |
./collections/__init__.py: def __getitem__(self, index): return self.__class__(self.data[index]) | |
./collections/__init__.py: return self.__class__(self.data + other.data) | |
./collections/__init__.py: return self.__class__(self.data + other) | |
./collections/__init__.py: return self.__class__(self.data + str(other)) | |
./collections/__init__.py: return self.__class__(other + self.data) | |
./collections/__init__.py: return self.__class__(str(other) + self.data) | |
./collections/__init__.py: return self.__class__(self.data*n) | |
./collections/__init__.py: return self.__class__(self.data % args) | |
./collections/__init__.py: def capitalize(self): return self.__class__(self.data.capitalize()) | |
./collections/__init__.py: return self.__class__(self.data.center(width, *args)) | |
./collections/__init__.py: return self.__class__(self.data.encode(encoding, errors)) | |
./collections/__init__.py: return self.__class__(self.data.encode(encoding)) | |
./collections/__init__.py: return self.__class__(self.data.encode()) | |
./collections/__init__.py: return self.__class__(self.data.expandtabs(tabsize)) | |
./collections/__init__.py: return self.__class__(self.data.ljust(width, *args)) | |
./collections/__init__.py: def lower(self): return self.__class__(self.data.lower()) | |
./collections/__init__.py: def lstrip(self, chars=None): return self.__class__(self.data.lstrip(chars)) | |
./collections/__init__.py: return self.__class__(self.data.replace(old, new, maxsplit)) | |
./collections/__init__.py: return self.__class__(self.data.rjust(width, *args)) | |
./collections/__init__.py: return self.__class__(self.data.rstrip(chars)) | |
./collections/__init__.py: def strip(self, chars=None): return self.__class__(self.data.strip(chars)) | |
./collections/__init__.py: def swapcase(self): return self.__class__(self.data.swapcase()) | |
./collections/__init__.py: def title(self): return self.__class__(self.data.title()) | |
./collections/__init__.py: return self.__class__(self.data.translate(*args)) | |
./collections/__init__.py: def upper(self): return self.__class__(self.data.upper()) | |
./collections/__init__.py: def zfill(self, width): return self.__class__(self.data.zfill(width)) | |
./modulefinder.py: self.__name__ = name | |
./modulefinder.py: s = "Module(%r" % (self.__name__,) | |
./modulefinder.py: pname = caller.__name__ | |
./modulefinder.py: assert parent.__name__ == pname | |
./modulefinder.py: qname = "%s.%s" % (parent.__name__, head) | |
./modulefinder.py: mname = "%s.%s" % (m.__name__, head) | |
./modulefinder.py: subname = "%s.%s" % (m.__name__, sub) | |
./modulefinder.py: self.badmodules[name][caller.__name__] = 1 | |
./modulefinder.py: mm = self.modules.get(m.__name__ + "." + name) | |
./modulefinder.py: self._safe_import_hook(parent.__name__, None, fromlist, level=0) | |
./modulefinder.py: fullname = parent.__name__+'.'+name | |
./smtpd.py: asynchat.async_chat.__init__(self, conn, map=map) | |
./smtpd.py: asyncore.dispatcher.__init__(self, map=map) | |
./smtpd.py: self.__class__.__name__, time.ctime(time.time()), | |
./smtpd.py: print('got', e.__class__, file=DEBUGSTREAM) | |
./turtle.py: return tuple.__new__(cls, (x, y)) | |
./turtle.py: TK.Frame.__init__(self, master, width=width, height=height) | |
./turtle.py: TK.Tk.__init__(self) | |
./turtle.py: TurtleScreenBase.__init__(self, cv) | |
./turtle.py: TNavigator.__init__(self, screen.mode()) | |
./turtle.py: TPen.__init__(self) | |
./turtle.py: TurtleScreen.__init__(self, _Screen._canvas) | |
./turtle.py: RawTurtle.__init__(self, Turtle._screen, | |
./csv.py: if self.__class__ != Dialect: | |
./fileinput.py:setting the mode parameter to input() or FileInput.__init__(). | |
./socketserver.py: BaseServer.__init__(self, server_address, RequestHandlerClass) | |
./tkinter/ttk.py: tkinter.Widget.__init__(self, master, widgetname, kw=kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::button", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::checkbutton", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, widget or "ttk::entry", kw) | |
./tkinter/ttk.py: Entry.__init__(self, master, "ttk::combobox", **kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::frame", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::label", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::labelframe", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::menubutton", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::notebook", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::panedwindow", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::progressbar", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::radiobutton", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::scale", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::scrollbar", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::separator", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::sizegrip", kw) | |
./tkinter/ttk.py: Widget.__init__(self, master, "ttk::treeview", kw) | |
./tkinter/ttk.py: Frame.__init__(self, master, **kw) | |
./tkinter/ttk.py: Menubutton.__init__(self, master, **kw) | |
./tkinter/tix.py:# (TixWidget.__init__) has been taken from Tkinter (Widget.__init__) | |
./tkinter/tix.py: tkinter.Tk.__init__(self, screenName, baseName, className) | |
./tkinter/tix.py: to create these widgets is therefore bypassed in TixWidget.__init__ | |
./tkinter/tix.py: TixWidget.__init__(self, master, None, None, {'name' : name}) | |
./tkinter/tix.py: TixWidget.__init__(self, parent, None, None, {'name' : name}) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixButtonBox', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixComboBox', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixControl', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixDirTree', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixDirSelectBox', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixExFileSelectBox', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixDirSelectDialog', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixExFileSelectDialog', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixFileSelectBox', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixFileSelectDialog', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixFileEntry', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixHList', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixInputOnly', None, cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixLabelEntry', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixLabelFrame', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixListNoteBook', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixMeter', | |
./tkinter/tix.py: TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixOptionMenu', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixPanedWindow', ['orientation', 'options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixPopupMenu', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixResizeHandle', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixScrolledHList', ['options'], | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixScrolledListBox', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixScrolledText', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixScrolledTList', ['options'], | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixScrolledWindow', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixSelect', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixShell', ['options', 'title'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixStdButtonBox', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixTList', ['options'], cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixTree', | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixCheckList', | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, ['fancy',destroy_physically]) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixSubWidget.__init__(self, master, name, destroy_physically) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixGrid', static, cnf, kw) | |
./tkinter/tix.py: TixWidget.__init__(self, master, 'tixScrolledGrid', static, cnf, kw) | |
./tkinter/scrolledtext.py: Text.__init__(self, self.frame, **kw) | |
./tkinter/__init__.py: cbname = cbname + callback.__name__ | |
./tkinter/__init__.py: return self.__class__.__name__ == other.__class__.__name__ \ | |
./tkinter/__init__.py: Variable.__init__(self, master, value, name) | |
./tkinter/__init__.py: Variable.__init__(self, master, value, name) | |
./tkinter/__init__.py: Variable.__init__(self, master, value, name) | |
./tkinter/__init__.py: Variable.__init__(self, master, value, name) | |
./tkinter/__init__.py: callit.__name__ = func.__name__ | |
./tkinter/__init__.py: name = name + func.__name__ | |
./tkinter/__init__.py: BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'button', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'canvas', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'checkbutton', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'entry', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'frame', cnf, {}, extra) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'label', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'listbox', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'menu', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'menubutton', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'message', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'radiobutton', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'scale', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'scrollbar', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'text', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, "menubutton", kw) | |
./tkinter/__init__.py: Image.__init__(self, 'photo', name, cnf, master, **kw) | |
./tkinter/__init__.py: Image.__init__(self, 'bitmap', name, cnf, master, **kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'spinbox', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'labelframe', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'panedwindow', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'studbutton', cnf, kw) | |
./tkinter/__init__.py: Widget.__init__(self, master, 'tributton', cnf, kw) | |
./tkinter/test/test_tkinter/test_widgets.py: widget.__class__.__name__.title()) | |
./tkinter/test/widget_tests.py: (option, cls.__name__)) | |
./tkinter/test/widget_tests.py: test.__name__ = methodname | |
./tkinter/simpledialog.py: Toplevel.__init__(self, parent) | |
./tkinter/simpledialog.py: Dialog.__init__(self, parent, title) | |
./tkinter/simpledialog.py: _QueryDialog.__init__(self, *args, **kw) | |
./encodings/utf_16.py: codecs.IncrementalEncoder.__init__(self, errors) | |
./encodings/utf_16.py: codecs.BufferedIncrementalDecoder.__init__(self, errors) | |
./encodings/utf_16.py: codecs.StreamWriter.__init__(self, stream, errors) | |
./encodings/charmap.py: codecs.IncrementalEncoder.__init__(self, errors) | |
./encodings/charmap.py: codecs.IncrementalDecoder.__init__(self, errors) | |
./encodings/charmap.py: codecs.StreamWriter.__init__(self,stream,errors) | |
./encodings/charmap.py: codecs.StreamReader.__init__(self,stream,errors) | |
./encodings/utf_8_sig.py: codecs.IncrementalEncoder.__init__(self, errors) | |
./encodings/utf_8_sig.py: codecs.BufferedIncrementalDecoder.__init__(self, errors) | |
./encodings/utf_32.py: codecs.IncrementalEncoder.__init__(self, errors) | |
./encodings/utf_32.py: codecs.BufferedIncrementalDecoder.__init__(self, errors) | |
./encodings/utf_32.py: codecs.StreamWriter.__init__(self, stream, errors) | |
./encodings/__init__.py: % (mod.__name__, mod.__file__)) | |
./encodings/__init__.py: % (mod.__name__, mod.__file__)) | |
./encodings/__init__.py: entry += (None,)*(6-len(entry)) + (mod.__name__.split(".", 1)[1],) | |
./netrc.py: Exception.__init__(self, msg) | |
./nntplib.py: Exception.__init__(self, *args) | |
./nntplib.py: "not '{:40}'".format(date.__class__.__name__)) | |
./nntplib.py: "not '{:40}'".format(date.__class__.__name__)) | |
./nntplib.py: _NNTPBase.__init__(self, file, host, | |
./nntplib.py: """This works identically to NNTP.__init__, except for the change | |
./nntplib.py: _NNTPBase.__init__(self, file, host, | |
./shelve.py: Shelf.__init__(self, dict, protocol, writeback, keyencoding) | |
./shelve.py: Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) | |
./sqlite3/test/factory.py: sqlite.Connection.__init__(self, *args, **kwargs) | |
./sqlite3/test/factory.py: sqlite.Cursor.__init__(self, *args, **kwargs) | |
./sqlite3/test/dbapi.py: print("raised", e.__class__) | |
./sqlite3/test/regression.py: sqlite.Cursor.__init__(self, con) | |
./asyncore.py: status = [self.__class__.__module__+"."+self.__class__.__name__] | |
./asyncore.py: %(self.__class__.__name__, attr)) | |
./asyncore.py: "instead" % {'me' : self.__class__.__name__, 'attr' : attr} | |
./asyncore.py: dispatcher.__init__(self, sock, map) | |
./asyncore.py: dispatcher.__init__(self, None, map) | |
./optparse.py: return "<%s at 0x%x: %s>" % (self.__class__.__name__, id(self), self) | |
./optparse.py: BadOptionError.__init__(self, opt_str) | |
./optparse.py: HelpFormatter.__init__( | |
./optparse.py: HelpFormatter.__init__ ( | |
./optparse.py: self.type = self.type.__name__ | |
./optparse.py: OptionContainer.__init__( | |
./optparse.py: OptionContainer.__init__( | |
./tracemalloc.py: Sequence.__init__(self) | |
./tracemalloc.py: Sequence.__init__(self) | |
./tracemalloc.py: % type(filters).__name__) | |
./runpy.py: if type(importer).__name__ == 'NullImporter': | |
./enum.py: super().__init__() | |
./enum.py: enum_class = super().__new__(metacls, cls, bases, classdict) | |
./enum.py: enum_member.__init__(*args) | |
./enum.py: enum_class.__new__ = Enum.__new__ | |
./enum.py: return cls.__new__(cls, value) | |
./enum.py: "%s: cannot delete Enum member." % cls.__name__) | |
./enum.py: return "<enum %r>" % cls.__name__ | |
./enum.py: metacls = cls.__class__ | |
./enum.py: enum_class = metacls.__new__(metacls, class_name, bases, classdict) | |
./enum.py: None.__new__, | |
./enum.py: object.__new__, | |
./enum.py: Enum.__new__, | |
./enum.py: __new__ = object.__new__ | |
./enum.py: # if a non-object.__new__ is used then whatever value/tuple was | |
./enum.py: if __new__ is object.__new__: | |
./enum.py: raise ValueError("%r is not a valid %s" % (value, cls.__name__)) | |
./enum.py: self.__class__.__name__, self._name_, self._value_) | |
./enum.py: return "%s.%s" % (self.__class__.__name__, self._name_) | |
./enum.py: for cls in self.__class__.mro() | |
./enum.py: return self.__class__, (self._value_, ) | |
./distutils/util.py: msg = "%s%r" % (func.__name__, args) | |
./distutils/msvccompiler.py: CCompiler.__init__ (self, verbose, dry_run, force) | |
./distutils/version.py: return "%s ('%s')" % (self.__class__.__name__, str(self)) | |
./distutils/command/bdist_msi.py: Dialog.__init__(self, *args) | |
./distutils/command/check.py: Reporter.__init__(self, source, report_level, halt_level, stream, | |
./distutils/command/build_ext.py: # - Command.__init__() needs access to its share of the whole | |
./distutils/tests/test_build_ext.py: ALREADY_TESTED = type(self).__name__ | |
./distutils/tests/test_config.py: PyPIRCCommand.__init__(self, dist) | |
./distutils/tests/support.py: % (type(msg).__name__)) | |
./distutils/bcppcompiler.py: CCompiler.__init__ (self, verbose, dry_run, force) | |
./distutils/cmd.py: if self.__class__ is Command: | |
./distutils/cmd.py: % self.__class__) | |
./distutils/cmd.py: % self.__class__) | |
./distutils/cmd.py: % self.__class__) | |
./distutils/cmd.py: return self.__class__.__name__ | |
./distutils/cygwinccompiler.py: UnixCCompiler.__init__(self, verbose, dry_run, force) | |
./distutils/cygwinccompiler.py: CygwinCCompiler.__init__ (self, verbose, dry_run, force) | |
./distutils/msvc9compiler.py: CCompiler.__init__ (self, verbose, dry_run, force) | |
./distutils/dist.py: parser.__init__() | |
./distutils/dist.py: parser.print_help("Options for '%s' command:" % klass.__name__) | |
./distutils/ccompiler.py: (key, self.__class__.__name__)) | |
./threading.py: self.__class__.__name__, owner, self._count) | |
./threading.py: Semaphore.__init__(self, value) | |
./threading.py: self._cond.__init__(Lock()) | |
./threading.py: the base class constructor (Thread.__init__()) before doing anything | |
./threading.py: assert self._initialized, "Thread.__init__() was not called" | |
./threading.py: return "<%s(%s, %s)>" % (self.__class__.__name__, self._name, status) | |
./threading.py: raise RuntimeError("thread.__init__() not called") | |
./threading.py: raise RuntimeError("Thread.__init__() not called") | |
./threading.py: assert self._initialized, "Thread.__init__() not called" | |
./threading.py: assert self._initialized, "Thread.__init__() not called" | |
./threading.py: assert self._initialized, "Thread.__init__() not called" | |
./threading.py: assert self._initialized, "Thread.__init__() not called" | |
./threading.py: assert self._initialized, "Thread.__init__() not called" | |
./threading.py: raise RuntimeError("Thread.__init__() not called") | |
./threading.py: Thread.__init__(self) | |
./threading.py: Thread.__init__(self, name="MainThread", daemon=False) | |
./threading.py: Thread.__init__(self, name=_newname("Dummy-%d"), daemon=True) | |
./json/__init__.py: s.__class__.__name__)) | |
./hmac.py: raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).__name__) | |
./hmac.py: other = self.__class__.__new__(self.__class__) | |
./ftplib.py: FTP.__init__(self, host, user, passwd, acct, timeout, source_address) | |
./concurrent/futures/_base.py: super(_AsCompletedWaiter, self).__init__() | |
./concurrent/futures/_base.py: super().__init__() | |
./concurrent/futures/_base.py: self._exception.__class__.__name__) | |
./concurrent/futures/_base.py: self._result.__class__.__name__) | |
./logging/handlers.py: logging.FileHandler.__init__(self, filename, mode, encoding, delay) | |
./logging/handlers.py: BaseRotatingHandler.__init__(self, filename, mode, encoding, delay) | |
./logging/handlers.py: BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay) | |
./logging/handlers.py: logging.FileHandler.__init__(self, filename, mode, encoding, delay) | |
./logging/handlers.py: logging.Handler.__init__(self) | |
./logging/handlers.py: SocketHandler.__init__(self, host, port) | |
./logging/handlers.py: logging.Handler.__init__(self) | |
./logging/handlers.py: logging.Handler.__init__(self) | |
./logging/handlers.py: logging.Handler.__init__(self) | |
./logging/handlers.py: logging.Handler.__init__(self) | |
./logging/handlers.py: logging.Handler.__init__(self) | |
./logging/handlers.py: BufferingHandler.__init__(self, capacity) | |
./logging/handlers.py: logging.Handler.__init__(self) | |
./logging/config.py: ThreadingTCPServer.__init__(self, (host, port), handler) | |
./logging/config.py: super(Server, self).__init__() | |
./logging/__init__.py: Filterer.__init__(self) | |
./logging/__init__.py: Handler.__init__(self) | |
./logging/__init__.py: Handler.__init__(self) | |
./logging/__init__.py: StreamHandler.__init__(self, self._open()) | |
./logging/__init__.py: Handler.__init__(self, level) | |
./logging/__init__.py: __init__() should call Logger.__init__() | |
./logging/__init__.py: + klass.__name__) | |
./logging/__init__.py: + klass.__name__) | |
./logging/__init__.py: Filterer.__init__(self) | |
./logging/__init__.py: Logger.__init__(self, "root", level) | |
./email/mime/multipart.py: MIMEBase.__init__(self, 'multipart', _subtype, **_params) | |
./email/mime/message.py: MIMENonMultipart.__init__(self, 'message', _subtype) | |
./email/mime/text.py: MIMENonMultipart.__init__(self, 'text', _subtype, | |
./email/mime/application.py: MIMENonMultipart.__init__(self, 'application', _subtype, **_params) | |
./email/mime/audio.py: MIMENonMultipart.__init__(self, 'audio', _subtype, **_params) | |
./email/mime/image.py: MIMENonMultipart.__init__(self, 'image', _subtype, **_params) | |
./email/mime/base.py: message.Message.__init__(self) | |
./email/message.py: Message.__init__(self, policy) | |
./email/policy.py: super().__init__(**kw) | |
./email/headerregistry.py: self = str.__new__(cls, kwds['decoded']) | |
./email/headerregistry.py: self.__class__.__name__, | |
./email/headerregistry.py: self.__class__.__bases__, | |
./email/headerregistry.py: return str.__new__(cls, value) | |
./email/headerregistry.py: return type('_'+cls.__name__, (cls, self.base_class), {}) | |
./email/header.py: super().__init__() | |
./email/generator.py: return self.__class__(fp, | |
./email/generator.py: """Like Generator.__init__() except that an additional optional | |
./email/generator.py: Generator.__init__(self, outfp, mangle_from_, maxheaderlen) | |
./email/_policybase.py: name, self.__class__.__name__)) | |
./email/_policybase.py: return "{}({})".format(self.__class__.__name__, ', '.join(args)) | |
./email/_policybase.py: newpolicy = self.__class__.__new__(self.__class__) | |
./email/_policybase.py: attr, self.__class__.__name__)) | |
./email/_policybase.py: raise AttributeError(msg.format(self.__class__.__name__, name)) | |
./email/_parseaddr.py: AddrlistClass.__init__(self, field) | |
./email/errors.py: super().__init__(line) | |
./email/errors.py: super().__init__(*args, **kw) | |
./email/errors.py: super().__init__(non_printables) | |
./email/contentmanager.py: name = typ.__name__ | |
./email/_header_value_parser.py: super().__init__(*args, **kw) | |
./email/_header_value_parser.py: return '{}({})'.format(self.__class__.__name__, | |
./email/_header_value_parser.py: klass = self.__class__ | |
./email/_header_value_parser.py: self.__class__.__name__, | |
./email/_header_value_parser.py: self = super().__new__(cls, value) | |
./email/_header_value_parser.py: return "{}({})".format(self.__class__.__name__, super().__repr__()) | |
./email/_header_value_parser.py: self.__class__.__name__, | |
./turtledemo/__main__.py: turtle.TurtleScreen.__init__(_s_, _s_._canvas) | |
./turtledemo/planet_and_moon.py: Turtle.__init__(self, shape=shape) | |
./turtledemo/minimal_hanoi.py: Turtle.__init__(self, shape="square", visible=False) | |
./turtledemo/nim.py: turtle.Turtle.__init__(self, visible=False) | |
./turtledemo/colormixer.py: Turtle.__init__(self) | |
./traceback.py: stype = etype.__name__ | |
./traceback.py: return '<unprintable %s object>' % type(value).__name__ | |
./profile.py: self.c_func_name = arg.__name__ | |
./profile.py: self.c_func_name = arg.__name__ | |
./profile.py: self.c_func_name = arg.__name__ | |
./profile.py: self.c_func_name = arg.__name__ | |
./profile.py: if self.__class__ is not Profile: | |
./test/test_http_cookiejar.py: self.assertIsNot(exc.__class__, LoadError) | |
./test/test_exceptions.py: self.assertEqual(exc.__name__, excname) | |
./test/test_exceptions.py: if not type(e).__name__.endswith('NaiveException'): | |
./test/test_exceptions.py: BaseException.__init__(self) | |
./test/test_exceptions.py: self.assertEqual(str(klass.__new__(klass)), "") | |
./test/test_nntplib.py: io.RawIOBase.__init__(self) | |
./test/test_optparse.py: typename = type('').__name__ | |
./test/test_deque.py: d.__init__(range(200)) | |
./test/test_deque.py: d.__init__(range(200)) | |
./test/test_deque.py: deque.__init__(self) | |
./test/test_functools.py: name = self.partial.__name__ | |
./test/test_functools.py: self.assertEqual(wrapper.__name__, 'f') | |
./test/test_functools.py: self.assertEqual(wrapper.__name__, 'wrapper') | |
./test/test_functools.py: self.assertEqual(wrapper.__name__, 'wrapper') | |
./test/test_functools.py: self.assertEqual(wrapper.__name__, 'max') | |
./test/test_functools.py: self.assertEqual(wrapper.__name__, 'f') | |
./test/test_functools.py: self.assertEqual(wrapper.__name__, 'wrapper') | |
./test/test_functools.py: self.assertEqual(wrapper.__name__, 'wrapper') | |
./test/test_functools.py: self.assertEqual(g.__name__, "g") | |
./test/test_functools.py: super(TracingDict, self).__init__(*args, **kwargs) | |
./test/test_genericpath.py: .format(self.pathmodule.__name__, attr)) | |
./test/test_genericpath.py: if self.pathmodule.__name__ == 'macpath': | |
./test/test_genericpath.py: if self.pathmodule.__name__ == 'macpath': | |
./test/mapping_tests.py: unittest.TestCase.__init__(self, *args, **kw) | |
./test/mapping_tests.py: self.assertTrue(dictlike.fromkeys('a').__class__ is dictlike) | |
./test/mapping_tests.py: self.assertTrue(dictlike().fromkeys('a').__class__ is dictlike) | |
./test/mapping_tests.py: self.assertIsInstance(d.copy(), d.__class__) | |
./test/test_importlib/test_abc.py: super().__init__(*args, **kwargs) | |
./test/test_importlib/test_abc.py: assert self.subclasses or self.superclasses, self.__class__ | |
./test/test_importlib/test_abc.py: testing = self.__class__.__name__.partition('_')[2] | |
./test/test_importlib/test_abc.py: classes.append(types.new_class('_'.join([prefix, base_class.__name__]), | |
./test/test_importlib/test_abc.py: name = '_'.join([kind, base_class.__name__]) | |
./test/test_importlib/test_abc.py: base_classes = base_class, getattr(abc, base_class.__name__) | |
./test/test_importlib/test_abc.py: tests.append(types.new_class('_'.join([prefix, test_class.__name__]), | |
./test/test_importlib/test_abc.py: self.assertEqual(name, module.__name__) | |
./test/test_importlib/test_abc.py: super().__init__(path) | |
./test/test_importlib/test_abc.py: self.assertEqual(module.__name__, self.name) | |
./test/test_importlib/test_abc.py: self.assertFalse(self.loader.is_package(self.name + '.__init__')) | |
./test/test_importlib/test_abc.py: original_set_data = self.loader.__class__.mro()[1].set_data | |
./test/test_importlib/test_abc.py: del self.loader.__class__.mro()[1].set_data | |
./test/test_importlib/test_abc.py: self.loader.__class__.mro()[1].set_data = original_set_data | |
./test/test_importlib/util.py: frozen_tests = types.new_class('Frozen_'+test_class.__name__, | |
./test/test_importlib/util.py: source_tests = types.new_class('Source_'+test_class.__name__, | |
./test/test_importlib/util.py: if not name.endswith('.__init__'): | |
./test/test_importlib/util.py: import_name = name[:-len('.__init__')] | |
./test/test_importlib/test_util.py: self.assertEqual(module.__name__, module_name) | |
./test/test_importlib/test_util.py: self.assertEqual(wrapped.__name__, fxn.__name__) | |
./test/test_importlib/test_util.py: self.assertEqual(module.__name__, name) | |
./test/test_importlib/test_util.py: self.assertEqual(module.__name__, name) | |
./test/test_importlib/test_util.py: self.assertEqual(wrapped.__name__, fxn.__name__) | |
./test/test_importlib/builtin/test_loader.py: self.assertIn(module.__name__, sys.modules) | |
./test/test_importlib/import_/test_packages.py: with util.mock_spec('pkg.__init__', 'pkg.module') as mock: | |
./test/test_importlib/import_/test_packages.py: mock = util.mock_spec('pkg.__init__', 'pkg.module', | |
./test/test_importlib/import_/test_packages.py: mock = util.mock_spec('pkg.__init__', 'pkg.module', | |
./test/test_importlib/import_/test_packages.py: mock = util.mock_spec('pkg.__init__', 'pkg.subpkg.__init__', | |
./test/test_importlib/import_/test_fromlist.py: with util.mock_spec('pkg.__init__', 'pkg.module') as importer: | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_fromlist.py: with util.mock_modules('pkg.__init__', 'pkg.module')as importer: | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.__name__, 'pkg.module') | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.__name__, 'module') | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.__name__, 'module') | |
./test/test_importlib/import_/test_fromlist.py: with util.mock_modules('pkg.__init__', 'pkg.module') as importer: | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.module.__name__, 'pkg.module') | |
./test/test_importlib/import_/test_fromlist.py: with util.mock_modules('pkg.__init__', 'pkg.mod', | |
./test/test_importlib/import_/test_fromlist.py: with util.mock_modules('pkg.__init__', 'pkg.mod') as importer: | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.__name__, 'pkg.mod') | |
./test/test_importlib/import_/test_fromlist.py: with util.mock_modules('pkg.__init__', 'pkg.module') as mock: | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.module.__name__, 'pkg.module') | |
./test/test_importlib/import_/test_fromlist.py: context = util.mock_modules('pkg.__init__', 'pkg.module1', 'pkg.module2') | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.module1.__name__, 'pkg.module1') | |
./test/test_importlib/import_/test_fromlist.py: self.assertEqual(module.module2.__name__, 'pkg.module2') | |
./test/test_importlib/import_/test_meta_path.py: with self.mock_modules(pkg_name+'.__init__', mod_name) as importer: | |
./test/test_importlib/import_/test_api.py: if module.__name__ == SUBMOD_NAME: | |
./test/test_importlib/import_/test___package__.py: with self.mock_modules('pkg.__init__', 'pkg.fake') as importer: | |
./test/test_importlib/import_/test___package__.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test___package__.py: with self.mock_modules('pkg.__init__', 'pkg.fake') as importer: | |
./test/test_importlib/import_/test___package__.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test___package__.py: with self.mock_modules('pkg.__init__') as mock: | |
./test/test_importlib/import_/test___package__.py: with self.mock_modules('pkg.__init__', 'pkg.mod') as mock: | |
./test/test_importlib/import_/test_relative_imports.py: # From pkg.__init__ [too high from package] | |
./test/test_importlib/import_/test_relative_imports.py: if not name.endswith('.__init__'): | |
./test/test_importlib/import_/test_relative_imports.py: uncache_names.append(name[:-len('.__init__')]) | |
./test/test_importlib/import_/test_relative_imports.py: create = 'pkg.__init__', 'pkg.mod2' | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_relative_imports.py: create = 'pkg.__init__', 'pkg.mod2' | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(module.__name__, 'pkg.mod2') | |
./test/test_importlib/import_/test_relative_imports.py: create = 'pkg.__init__', 'pkg.module' | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_relative_imports.py: create = 'pkg.__init__', 'pkg.module' | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_relative_imports.py: create = ('pkg.__init__', 'pkg.subpkg1.__init__', | |
./test/test_importlib/import_/test_relative_imports.py: 'pkg.subpkg2.__init__') | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(module.subpkg2.attr, 'pkg.subpkg2.__init__') | |
./test/test_importlib/import_/test_relative_imports.py: create = ['pkg.__init__'] | |
./test/test_importlib/import_/test_relative_imports.py: create.append('{0}.pkg{1}.__init__'.format( | |
./test/test_importlib/import_/test_relative_imports.py: create[-1][:-len('.__init__')], count)) | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(module.__name__, 'pkg') | |
./test/test_importlib/import_/test_relative_imports.py: create = ['top_level', 'pkg.__init__'] | |
./test/test_importlib/import_/test_relative_imports.py: create = ['top_level', 'pkg.__init__', 'pkg.module'] | |
./test/test_importlib/import_/test_relative_imports.py: create = ['__runpy_pkg__.__init__', | |
./test/test_importlib/import_/test_relative_imports.py: '__runpy_pkg__.__runpy_pkg__.__init__', | |
./test/test_importlib/import_/test_relative_imports.py: '__runpy_pkg__.uncle.__init__', | |
./test/test_importlib/import_/test_relative_imports.py: '__runpy_pkg__.uncle.cousin.__init__', | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(module.__name__, '__runpy_pkg__.uncle.cousin') | |
./test/test_importlib/import_/test_relative_imports.py: create = ['crash.__init__', 'crash.mod'] | |
./test/test_importlib/import_/test_relative_imports.py: self.assertEqual(mod.__name__, 'crash.mod') | |
./test/test_importlib/import_/test_caching.py: with self.create_mock('pkg.__init__', 'pkg.module') as importer: | |
./test/test_importlib/import_/test_caching.py: with self.create_mock('pkg.__init__', 'pkg.module') as importer: | |
./test/test_importlib/test_api.py: self.assertEqual(module.__name__, 'top_level') | |
./test/test_importlib/test_api.py: pkg_long_name = '{0}.__init__'.format(pkg_name) | |
./test/test_importlib/test_api.py: self.assertEqual(module.__name__, name) | |
./test/test_importlib/test_api.py: pkg_long_name = '{0}.__init__'.format(pkg_name) | |
./test/test_importlib/test_api.py: self.assertEqual(module.__name__, absolute_name) | |
./test/test_importlib/test_api.py: modules = ['a.__init__', 'a.b.__init__', 'a.c'] | |
./test/test_importlib/test_api.py: self.assertEqual(module.__name__, 'a.c') | |
./test/test_importlib/test_api.py: pkg_long_name = '{0}.__init__'.format(pkg_name) | |
./test/test_importlib/test_api.py: self.assertEqual(module.__name__, name) | |
./test/test_importlib/test_api.py: modules = ['a.__init__', 'a.b'] | |
./test/test_importlib/test_api.py: self.assertNotEqual(source_init.__loader__.__class__.__name__, | |
./test/test_importlib/test_spec.py: self.assertEqual(module.__name__, spec.name) | |
./test/test_importlib/test_spec.py: self.assertEqual(module.__name__, spec.name) | |
./test/test_importlib/test_spec.py: self.assertEqual(module.__name__, spec.name) | |
./test/test_importlib/test_spec.py: self.assertEqual(module.__name__, spec.name) | |
./test/test_importlib/test_spec.py: self.assertEqual(module.__name__, spec.name) | |
./test/test_importlib/test_spec.py: self.assertEqual(created.__name__, self.spec.name) | |
./test/test_importlib/test_spec.py: self.assertEqual(created.__name__, self.spec.name) | |
./test/test_importlib/test_spec.py: self.assertEqual(created.__name__, self.spec.name) | |
./test/test_importlib/test_spec.py: sys.modules[module.__name__] = replacement | |
./test/test_importlib/test_spec.py: del sys.modules[module.__name__] | |
./test/test_importlib/test_spec.py: loaded.__name__ = 'ham' | |
./test/test_importlib/test_spec.py: self.assertEqual(loaded.__name__, self.spec.name) | |
./test/test_importlib/test_spec.py: return '<delicious {}>'.format(module.__name__) | |
./test/test_importlib/test_spec.py: del self.module.__name__ | |
./test/test_importlib/source/util.py: import_name = name[:-len('.__init__')] | |
./test/test_importlib/source/test_finder.py: self.run_test('pkg', {'pkg.__init__'}) | |
./test/test_importlib/source/test_finder.py: self.run_test('pkg', {'pkg.__init__'}, compile_={'pkg.__init__'}, | |
./test/test_importlib/source/test_finder.py: unlink={'pkg.__init__'}) | |
./test/test_importlib/source/test_finder.py: self.run_test('pkg', {'pkg.__init__'}, compile_={'pkg.__init__'}) | |
./test/test_importlib/source/test_finder.py: with source_util.create_modules('pkg.__init__', 'pkg.sub') as mapping: | |
./test/test_importlib/source/test_finder.py: pkg_dir = os.path.dirname(mapping['pkg.__init__']) | |
./test/test_importlib/source/test_finder.py: context = source_util.create_modules('pkg.__init__', 'pkg.sub.__init__') | |
./test/test_importlib/source/test_finder.py: pkg_dir = os.path.dirname(mapping['pkg.__init__']) | |
./test/test_importlib/source/test_finder.py: loader = self.run_test(name, {'{0}.__init__'.format(name), name}) | |
./test/test_importlib/source/test_file_loader.py: with source_util.create_modules('_pkg.__init__') as mapping: | |
./test/test_importlib/source/test_file_loader.py: mapping['_pkg.__init__']) | |
./test/test_importlib/source/test_file_loader.py: check = {'__name__': '_pkg', '__file__': mapping['_pkg.__init__'], | |
./test/test_importlib/source/test_file_loader.py: '__path__': [os.path.dirname(mapping['_pkg.__init__'])], | |
./test/test_importlib/source/test_file_loader.py: with source_util.create_modules('_pkg.__init__', '_pkg.mod')as mapping: | |
./test/test_robotparser.py: unittest.TestCase.__init__(self) | |
./test/test_robotparser.py: return '%s' % self.__class__.__name__ | |
./test/test_super.py: self.assertEqual(x.__class__, 413) | |
./test/test_abc.py: def foo(cls): return cls.__name__ | |
./test/test_abc.py: def foo(cls): return cls.__name__ | |
./test/test_abc.py: def foo(cls): return cls.__name__ | |
./test/test_abc.py: return super().__new__(cls) | |
./test/test_enum.py: self.__class__.NestedEnum = NestedEnum | |
./test/test_enum.py: self.NestedEnum.__qualname__ = '%s.NestedEnum' % self.__class__.__name__ | |
./test/test_enum.py: return super(auto_enum, metacls).__new__( | |
./test/test_enum.py: self = int.__new__(cls, *args) | |
./test/test_enum.py: return "{}({!r}, {})".format(type(self).__name__, | |
./test/test_enum.py: self.__name__, | |
./test/test_enum.py: '({0} + {1})'.format(self.__name__, other.__name__), | |
./test/test_enum.py: self.assertIs(NEI.__new__, Enum.__new__) | |
./test/test_enum.py: self = int.__new__(cls, *args) | |
./test/test_enum.py: return "{}({!r}, {})".format(type(self).__name__, | |
./test/test_enum.py: self.__name__, | |
./test/test_enum.py: '({0} + {1})'.format(self.__name__, other.__name__), | |
./test/test_enum.py: self.assertIs(NEI.__new__, Enum.__new__) | |
./test/test_enum.py: self = int.__new__(cls, *args) | |
./test/test_enum.py: return self.__class__, self._args | |
./test/test_enum.py: return "{}({!r}, {})".format(type(self).__name__, | |
./test/test_enum.py: self.__name__, | |
./test/test_enum.py: '({0} + {1})'.format(self.__name__, other.__name__), | |
./test/test_enum.py: self.assertIs(NEI.__new__, Enum.__new__) | |
./test/test_enum.py: self = int.__new__(cls, *args) | |
./test/test_enum.py: return self.__class__, self._args | |
./test/test_enum.py: return "{}({!r}, {})".format(type(self).__name__, | |
./test/test_enum.py: self.__name__, | |
./test/test_enum.py: '({0} + {1})'.format(self.__name__, other.__name__), | |
./test/test_enum.py: self.assertIs(NEI.__new__, Enum.__new__) | |
./test/test_enum.py: self = int.__new__(cls, *args) | |
./test/test_enum.py: return "{}({!r}, {})".format(type(self).__name__, | |
./test/test_enum.py: self.__name__, | |
./test/test_enum.py: '({0} + {1})'.format(self.__name__, other.__name__), | |
./test/test_enum.py: self.assertIs(NEI.__new__, Enum.__new__) | |
./test/test_enum.py: self = int.__new__(cls, *args) | |
./test/test_enum.py: return "{}({!r}, {})".format(type(self).__name__, | |
./test/test_enum.py: self.__name__, | |
./test/test_enum.py: '({0} + {1})'.format(self.__name__, other.__name__), | |
./test/test_enum.py: return getattr, (self.__class__, self._name_) | |
./test/test_enum.py: self.assertIs(NEI.__new__, Enum.__new__) | |
./test/test_enum.py: obj = object.__new__(cls) | |
./test/test_enum.py: obj = object.__new__(cls) | |
./test/test_enum.py: obj = int.__new__(cls, value) | |
./test/test_enum.py: if self.__class__ is other.__class__: | |
./test/test_enum.py: if self.__class__ is other.__class__: | |
./test/test_enum.py: if self.__class__ is other.__class__: | |
./test/test_enum.py: if self.__class__ is other.__class__: | |
./test/test_enum.py: cls = self.__class__ | |
./test/test_enum.py: obj = object.__new__(cls) | |
./test/test_enum.py: obj = int.__new__(cls, value) | |
./test/test_module.py: return "<module '{}' (crafted)>".format(m.__name__) | |
./test/test_module.py: foo = ModuleType.__new__(ModuleType) | |
./test/test_module.py: s = foo.__name__ | |
./test/test_module.py: self.assertEqual(foo.__name__, "foo") | |
./test/test_module.py: self.assertEqual(foo.__name__, "foo") | |
./test/test_module.py: self.assertEqual(foo.__name__, "foo") | |
./test/test_module.py: foo.__init__("foo", "foodoc") | |
./test/test_module.py: self.assertEqual(foo.__name__, "foo") | |
./test/test_module.py: del m.__name__ | |
./test/test_module.py: del m.__name__ | |
./test/test_module.py: del m.__name__ | |
./test/test_module.py: # m.__name__. This exception will get suppressed and instead the | |
./test/test_module.py: del m.__name__ | |
./test/test_buffer.py: listerr = e.__class__ | |
./test/test_buffer.py: nderr = e.__class__ | |
./test/test_buffer.py: listerr = e.__class__ | |
./test/test_buffer.py: nderr = e.__class__ | |
./test/test_buffer.py: lsterr = e.__class__ | |
./test/test_buffer.py: nderr = e.__class__ | |
./test/test_buffer.py: mverr = e.__class__ | |
./test/test_buffer.py: listerr = e.__class__ | |
./test/test_buffer.py: nderr = e.__class__ | |
./test/test_buffer.py: nderr = e.__class__ | |
./test/test_buffer.py: numpy_err = e.__class__ | |
./test/test_buffer.py: mv_err = e.__class__ | |
./test/test_buffer.py: array_err = e.__class__ | |
./test/test_buffer.py: m_err = e.__class__ | |
./test/test_concurrent_futures.py: """.format(executor_type=self.executor_type.__name__)) | |
./test/test_pep277.py: (fn.__name__, filename, exc_filename)) | |
./test/test_long.py: with self.subTest(x=x, mapper=mapper.__name__): | |
./test/test_long.py: self = int.__new__(cls, value) | |
./test/test_mmap.py: return mmap.mmap.__new__(klass, -1, *args, **kwargs) | |
./test/test_warnings.py: self.assertEqual(w[-1].filename, warning_tests.__name__) | |
./test/test_warnings.py: module_name = warning_tests.__name__ | |
./test/test_warnings.py: warning_tests.__name__ = '__main__' | |
./test/test_warnings.py: warning_tests.__name__ = module_name | |
./test/test_warnings.py: module_name = warning_tests.__name__ | |
./test/test_warnings.py: warning_tests.__name__ = '__main__' | |
./test/test_warnings.py: warning_tests.__name__ = module_name | |
./test/test_warnings.py: module_name = warning_tests.__name__ | |
./test/test_warnings.py: warning_tests.__name__ = '__main__' | |
./test/test_warnings.py: warning_tests.__name__ = module_name | |
./test/test_warnings.py: self.assertEqual(warning_class, ' ' + UserWarning.__name__) | |
./test/test_warnings.py: expect = format % (file_name, line_num, category.__name__, message, | |
./test/test_warnings.py: expect = format % (file_name, line_num, category.__name__, message, | |
./test/test_htmlparser.py: html.parser.HTMLParser.__init__(self, *args, **kw) | |
./test/test_smtpd.py: smtpd.SMTPServer.__init__(self, localaddr, remoteaddr) | |
./test/test_weakref.py: # <weakref to class>.__init__() doesn't check errors correctly | |
./test/test_weakref.py: self.assertRaises(TypeError, r.__init__, 0, 0, 0, 0, 0) | |
./test/test_weakref.py: super().__init__(ob, callback) | |
./test/test_weakref.py: return weakref.ref.__new__(type, ob, callback) | |
./test/test_weakref.py: self.assertRaises(TypeError, weakref.WeakValueDictionary.__init__) | |
./test/test_weakref.py:... super().__init__(ob, callback) | |
./test/list_tests.py: a.__init__() | |
./test/list_tests.py: a.__init__([4, 5, 6]) | |
./test/test_imp.py: self.assertEqual(mod.__name__, example) | |
./test/test_imp.py: self.assertEqual(mod0.__name__, m) | |
./test/test_imp.py: self.assertEqual(mod1.__name__, '_testimportmultiple_foo') | |
./test/test_imp.py: self.assertEqual(mod2.__name__, '_testimportmultiple_bar') | |
./test/test_contextlib.py: self.assertEqual(baz.__name__,'baz') | |
./test/test_contextlib.py: self.assertNotEqual(wrapper.__name__, _exit.__name__) | |
./test/leakers/test_selftype.py: U.__class__ = U | |
./test/test_ast.py: result = [t.__class__.__name__] | |
./test/ssl_servers.py: _HTTPServer.__init__(self, server_address, handler_class) | |
./test/ssl_servers.py: (self.__class__.__name__, | |
./test/ssl_servers.py: threading.Thread.__init__(self) | |
./test/ssl_servers.py: return "<%s %s>" % (self.__class__.__name__, self.server) | |
./test/test_traceback.py: lst = traceback.format_exception_only(e.__class__, e) | |
./test/test_traceback.py: str_value = '<unprintable %s object>' % X.__name__ | |
./test/test_traceback.py: str_name = X.__name__ | |
./test/test_traceback.py: str_name = '.'.join([X.__module__, X.__name__]) | |
./test/test_codeccallbacks.py: UnicodeEncodeError.__init__(self, "ascii", "", 0, 1, "bad") | |
./test/test_codeccallbacks.py: UnicodeEncodeError.__init__(self, "ascii", "", 0, 1, "bad") | |
./test/test_codeccallbacks.py: UnicodeDecodeError.__init__(self, "ascii", bytearray(b""), 0, 1, "bad") | |
./test/test_codeccallbacks.py: UnicodeDecodeError.__init__(self, "ascii", bytearray(b""), 0, 1, "bad") | |
./test/test_codeccallbacks.py: UnicodeTranslateError.__init__(self, "", 0, 1, "bad") | |
./test/test_codeccallbacks.py: UnicodeTranslateError.__init__(self, "", 0, 1, "bad") | |
./test/test_codeccallbacks.py: UnicodeTranslateError.__init__(self, "", 0, 1, "bad") | |
./test/test_types.py: super().__init__(name, bases, ns) | |
./test/test_types.py: return super().__new__(mcls, name, bases, ns) | |
./test/test_types.py: self.assertEqual(C.__name__, "C") | |
./test/test_types.py: self.assertEqual(C.__name__, "C") | |
./test/test_types.py: return type.__new__(*args, **kwargs) | |
./test/test_types.py: return super().__new__(mcls, name, bases, ns) | |
./test/test_types.py: return super().__new__(mcls, name, bases, ns) | |
./test/test_types.py: # BMeta.__new__ calls AMeta.__new__ with super: | |
./test/test_types.py: return super().__new__(mcls) | |
./test/test_types.py: return super().__new__(mcls) | |
./test/test_datetime.py: cls.__name__ = name + suffix | |
./test/test_dynamicclassattribute.py: self.assertEqual(sub.__class__.__dict__['spam'].__doc__, "SubClass.getter") | |
./test/test_dynamicclassattribute.py: self.assertEqual(base.__class__.__dict__['spam'].__doc__, "BaseClass.getter") | |
./test/test_dynamicclassattribute.py: self.assertEqual(base.__class__.__dict__['spam'].__doc__, "spam spam spam") | |
./test/test_dynamicclassattribute.py: self.assertEqual(sub.__class__.__dict__['spam'].__doc__, "spam spam spam") | |
./test/test_dynamicclassattribute.py: self.assertEqual(newgettersub.__class__.__dict__['spam'].__doc__, "new docstring") | |
./test/test_dynamicclassattribute.py: self.assertEqual(newgetter.__class__.__dict__['spam'].__doc__, "new docstring") | |
./test/test_pyclbr.py: objname = obj.__name__ | |
./test/test_pyclbr.py: objname = "_%s%s" % (oclass.__name__, objname) | |
./test/test_pyclbr.py: real_bases = [base.__name__ for base in py_item.__bases__] | |
./test/test_pyclbr.py: self.assertEqualsOrIgnored(py_item.__name__, value.name, | |
./test/test_pyclbr.py: return item.__module__ == module.__name__ | |
./test/test_shelve.py: mapping_tests.BasicTestMappingProtocol.__init__(self, *args, **kw) | |
./test/test_statistics.py: return self.__class__(super().__truediv__(other)) | |
./test/test_statistics.py: return self.__class__(super().__truediv__(other)) | |
./test/test_statistics.py: return self.__class__(super().__truediv__(other)) | |
./test/test_strptime.py: (bad_format, err.__class__.__name__)) | |
./test/test_complex.py: return complex.__new__(self, 2*value) | |
./test/test_scope.py: des = "_%s__%s" % (klass.__name__, name) | |
./test/test_scope.py: self.assertNotIn("x", c.__class__.__dict__) | |
./test/test_decimal.py: self.fail('Exception "'+exception.__class__.__name__ + '" raised on line '+line) | |
./test/test_decimal.py: expected, op.__name__, x, y, got)) | |
./test/test_decimal.py: expected, op.__name__, x, y, got)) | |
./test/test_decimal.py: ex = e.__class__ | |
./test/test_decimal.py: ex = e.__class__ | |
./test/test_decimal.py: Context.__init__(self) | |
./test/test_sys.py: attr_type.__new__(attr_type) | |
./test/test_itertools.py: cls.__init__(self, *args) | |
./test/test_set.py: self.assertRaises(TypeError, set().__init__, a=1) | |
./test/test_set.py: s.__init__(self.word) | |
./test/test_set.py: s.__init__(self.otherword) | |
./test/test_set.py: self.assertRaises(TypeError, s.__init__, s, 2); | |
./test/test_set.py: self.assertRaises(TypeError, s.__init__, 1); | |
./test/test_set.py: set.__init__(self, iterable) | |
./test/test_set.py: s.__init__(self.otherword) | |
./test/test_bool.py: self.assertRaises(TypeError, int.__new__, bool, 0) | |
./test/test_pep352.py: (ins.__class__.__name__, attr)) | |
./test/test_pep352.py: exc_set.add(object_.__name__) | |
./test/test_pep352.py: "%s is not a subclass of %s" % (exc.__name__, | |
./test/test_pep352.py: superclasses[-1][1].__name__)) | |
./test/test_pep352.py: [repr(exc), exc.__class__.__name__ + repr(exc.args)]) | |
./test/test_pep352.py: [repr(exc), exc.__class__.__name__ + repr(exc.args)]) | |
./test/test_pep352.py: [repr(exc), exc.__class__.__name__ + '()']) | |
./test/test_with.py: super().__init__(*args) | |
./test/test_with.py: Nested.__init__(self, *managers) | |
./test/test_with.py: self.assertEqual(targets[1][0].__class__, MockResource) | |
./test/test_with.py: self.assertEqual(targets[1][1].__class__, MockResource) | |
./test/test_urllib.py: self.text = bytes("test_urllib: %s\n" % self.__class__.__name__, | |
./test/test_pathlib.py: clsname = p.__class__.__name__ | |
./test/test_pathlib.py: self.assertIs(q.__class__, p.__class__) | |
./test/test_pathlib.py: self.assertIs(pp.__class__, p.__class__) | |
./test/test_descr.py: unittest.TestCase.__init__(self, *args, **kwargs) | |
./test/test_descr.py: result = complex.__new__(cls, *args) | |
./test/test_descr.py: self.assertIs(d.__class__, dict) | |
./test/test_descr.py: self.assertEqual(d.__class__, D) | |
./test/test_descr.py: return type.__new__(cls, name, bases, dict) | |
./test/test_descr.py: self = object.__new__(cls) | |
./test/test_descr.py: cls = super(autosuper, metaclass).__new__(metaclass, | |
./test/test_descr.py: return super(autoproperty, metaclass).__new__(metaclass, | |
./test/test_descr.py: # Make sure type(x) doesn't call x.__class__.__init__ | |
./test/test_descr.py: return type.__new__(*args, **kwargs) | |
./test/test_descr.py: return super().__new__(mcls, name, bases, ns) | |
./test/test_descr.py: return super().__new__(mcls, name, bases, ns) | |
./test/test_descr.py: # BMeta.__new__ calls AMeta.__new__ with super: | |
./test/test_descr.py: return super().__new__(mcls) | |
./test/test_descr.py: return super().__new__(mcls) | |
./test/test_descr.py: MT.__init__(self, name) | |
./test/test_descr.py: type({}).__init__(self) | |
./test/test_descr.py: C.__init__(self) | |
./test/test_descr.py: self.assertEqual(a.__class__, object) | |
./test/test_descr.py: self = list.__new__(cls) | |
./test/test_descr.py: self.assertEqual(a.__class__, C) | |
./test/test_descr.py: self.assertEqual(b.__class__, D) | |
./test/test_descr.py: x = object.__new__(X) | |
./test/test_descr.py: class DictSub(checker.__class__, dict): | |
./test/test_descr.py: return super(mysuper, self).__init__(*args) | |
./test/test_descr.py: return "F(%r)[%s]" % (a, s.__class__.__name__) + s.meth(a) | |
./test/test_descr.py: self.assertIs(int(a).__class__, int) | |
./test/test_descr.py: self.assertIs((+a).__class__, int) | |
./test/test_descr.py: self.assertIs((a >> 0).__class__, int) | |
./test/test_descr.py: self.assertIs((a << 0).__class__, int) | |
./test/test_descr.py: self.assertIs((hexint(0) << 12).__class__, int) | |
./test/test_descr.py: self.assertIs((hexint(0) >> 12).__class__, int) | |
./test/test_descr.py: return self.__class__(super(octlong, self).__add__(other)) | |
./test/test_descr.py: self.assertIs(int(a).__class__, int) | |
./test/test_descr.py: self.assertIs((+a).__class__, int) | |
./test/test_descr.py: self.assertIs((-a).__class__, int) | |
./test/test_descr.py: self.assertIs((-octlong(0)).__class__, int) | |
./test/test_descr.py: self.assertIs((a >> 0).__class__, int) | |
./test/test_descr.py: self.assertIs((a << 0).__class__, int) | |
./test/test_descr.py: self.assertIs((a - 0).__class__, int) | |
./test/test_descr.py: self.assertIs((a * 1).__class__, int) | |
./test/test_descr.py: self.assertIs((a ** 1).__class__, int) | |
./test/test_descr.py: self.assertIs((a // 1).__class__, int) | |
./test/test_descr.py: self.assertIs((1 * a).__class__, int) | |
./test/test_descr.py: self.assertIs((a | 0).__class__, int) | |
./test/test_descr.py: self.assertIs((a ^ 0).__class__, int) | |
./test/test_descr.py: self.assertIs((a & -1).__class__, int) | |
./test/test_descr.py: self.assertIs((octlong(0) << 12).__class__, int) | |
./test/test_descr.py: self.assertIs((octlong(0) >> 12).__class__, int) | |
./test/test_descr.py: self.assertIs(abs(octlong(0)).__class__, int) | |
./test/test_descr.py: self.assertIs((a + 0).__class__, int) | |
./test/test_descr.py: self.assertIs((0 + a).__class__, int) | |
./test/test_descr.py: self.assertIs(float(a).__class__, float) | |
./test/test_descr.py: self.assertIs((+a).__class__, float) | |
./test/test_descr.py: self.assertEqual(base.__class__, complex) | |
./test/test_descr.py: self.assertEqual(complex(a).__class__, complex) | |
./test/test_descr.py: self.assertEqual(complex(a).__class__, complex) | |
./test/test_descr.py: self.assertEqual((+a).__class__, complex) | |
./test/test_descr.py: self.assertEqual((a + 0).__class__, complex) | |
./test/test_descr.py: self.assertEqual((a - 0).__class__, complex) | |
./test/test_descr.py: self.assertEqual((a * 1).__class__, complex) | |
./test/test_descr.py: self.assertEqual((a / 1).__class__, complex) | |
./test/test_descr.py: self._rev = self.__class__(L) | |
./test/test_descr.py: self.assertIs(tuple(a).__class__, tuple) | |
./test/test_descr.py: self.assertIs(a[:].__class__, tuple) | |
./test/test_descr.py: self.assertIs((a * 1).__class__, tuple) | |
./test/test_descr.py: self.assertIs((a * 0).__class__, tuple) | |
./test/test_descr.py: self.assertIs((a + ()).__class__, tuple) | |
./test/test_descr.py: self.assertIs(tuple(a).__class__, tuple) | |
./test/test_descr.py: self.assertIs((a + a).__class__, tuple) | |
./test/test_descr.py: self.assertIs((a * 0).__class__, tuple) | |
./test/test_descr.py: self.assertIs((a * 1).__class__, tuple) | |
./test/test_descr.py: self.assertIs((a * 2).__class__, tuple) | |
./test/test_descr.py: self.assertIs(a[:].__class__, tuple) | |
./test/test_descr.py: self._rev = self.__class__("".join(L)) | |
./test/test_descr.py: self.assertIs(str(s).__class__, str) | |
./test/test_descr.py: self.assertIs(str(s).__class__, str) | |
./test/test_descr.py: self.assertIs((s + "").__class__, str) | |
./test/test_descr.py: self.assertIs(("" + s).__class__, str) | |
./test/test_descr.py: self.assertIs((s * 0).__class__, str) | |
./test/test_descr.py: self.assertIs((s * 1).__class__, str) | |
./test/test_descr.py: self.assertIs((s * 2).__class__, str) | |
./test/test_descr.py: self.assertIs(s[:].__class__, str) | |
./test/test_descr.py: self.assertIs(s[0:0].__class__, str) | |
./test/test_descr.py: self.assertIs(s.strip().__class__, str) | |
./test/test_descr.py: self.assertIs(s.lstrip().__class__, str) | |
./test/test_descr.py: self.assertIs(s.rstrip().__class__, str) | |
./test/test_descr.py: self.assertIs(s.translate(identitytab).__class__, str) | |
./test/test_descr.py: self.assertIs(s.replace("x", "x").__class__, str) | |
./test/test_descr.py: self.assertIs(s.ljust(len(s)).__class__, str) | |
./test/test_descr.py: self.assertIs(s.rjust(len(s)).__class__, str) | |
./test/test_descr.py: self.assertIs(s.center(len(s)).__class__, str) | |
./test/test_descr.py: self.assertIs(s.lower().__class__, str) | |
./test/test_descr.py: self._rev = self.__class__("".join(L)) | |
./test/test_descr.py: self.assertIs(str(u).__class__, str) | |
./test/test_descr.py: self.assertIs(u.strip().__class__, str) | |
./test/test_descr.py: self.assertIs(u.lstrip().__class__, str) | |
./test/test_descr.py: self.assertIs(u.rstrip().__class__, str) | |
./test/test_descr.py: self.assertIs(u.replace("x", "x").__class__, str) | |
./test/test_descr.py: self.assertIs(u.replace("xy", "xy").__class__, str) | |
./test/test_descr.py: self.assertIs(u.center(len(u)).__class__, str) | |
./test/test_descr.py: self.assertIs(u.ljust(len(u)).__class__, str) | |
./test/test_descr.py: self.assertIs(u.rjust(len(u)).__class__, str) | |
./test/test_descr.py: self.assertIs(u.lower().__class__, str) | |
./test/test_descr.py: self.assertIs(u.upper().__class__, str) | |
./test/test_descr.py: self.assertIs(u.capitalize().__class__, str) | |
./test/test_descr.py: self.assertIs(u.title().__class__, str) | |
./test/test_descr.py: self.assertIs((u + "").__class__, str) | |
./test/test_descr.py: self.assertIs(("" + u).__class__, str) | |
./test/test_descr.py: self.assertIs((u * 0).__class__, str) | |
./test/test_descr.py: self.assertIs((u * 1).__class__, str) | |
./test/test_descr.py: self.assertIs((u * 2).__class__, str) | |
./test/test_descr.py: self.assertIs(u[:].__class__, str) | |
./test/test_descr.py: self.assertIs(u[0:0].__class__, str) | |
./test/test_descr.py: object = object.__class__.__name__ + ' instance' | |
./test/test_descr.py: otype = otype.__name__ | |
./test/test_descr.py: x.__class__ = cls2 | |
./test/test_descr.py: self.assertIs(x.__class__, cls2) | |
./test/test_descr.py: x.__class__ = cls | |
./test/test_descr.py: self.assertIs(x.__class__, cls) | |
./test/test_descr.py: x.__class__ = C | |
./test/test_descr.py: self.fail("shouldn't allow %r.__class__ = %r" % (x, C)) | |
./test/test_descr.py: self.fail("shouldn't allow del %r.__class__" % x) | |
./test/test_descr.py: x.__class__ = cls2 | |
./test/test_descr.py: self.assertIs(x.__class__, cls2, | |
./test/test_descr.py: x.__class__ = cls | |
./test/test_descr.py: self.assertIs(x.__class__, cls, | |
./test/test_descr.py: self.__class__ = O | |
./test/test_descr.py: list.__init__(a, sequence=[0, 1, 2]) | |
./test/test_descr.py: m = M.__new__(M) | |
./test/test_descr.py: elif isinstance(arg, int): return object.__new__(D) | |
./test/test_descr.py: else: return object.__new__(cls) | |
./test/test_descr.py: return super(WorkOnce, self).__new__(WorkOnce, name, bases, ns) | |
./test/test_descr.py: C.__name__ = 'D' | |
./test/test_descr.py: self.assertEqual((C.__module__, C.__name__), (mod, 'D')) | |
./test/test_descr.py: C.__name__ = 'D.E' | |
./test/test_descr.py: self.assertEqual((C.__module__, C.__name__), (mod, 'D.E')) | |
./test/test_descr.py: C.__name__ = "other" | |
./test/test_descr.py: C.__name__ = Nasty("abc") | |
./test/test_descr.py: C.__name__ = "normal" | |
./test/test_descr.py: self.assertEqual(l.__add__.__name__, '__add__') | |
./test/test_descr.py: self.assertEqual(type(d).__name__, n + '_descriptor') | |
./test/test_descr.py: qualname = d.__objclass__.__qualname__ + '.' + d.__name__ | |
./test/test_descr.py: dict.__init__(self) | |
./test/test_descr.py: return object.__new__(cls, *args, **kwds) | |
./test/test_descr.py: return object.__init__(self, *args, **kwargs) | |
./test/test_descr.py: return "%s()<%r>" % (type(self).__name__, self.__getstate__()) | |
./test/test_descr.py: super().__init__() | |
./test/test_descr.py: self = super().__new__(cls) | |
./test/test_descr.py: super().__init__() | |
./test/test_descr.py: self = super().__new__(cls, value) | |
./test/test_descr.py: self = super().__new__(cls, value) | |
./test/test_descr.py: return type.__new__(mcls, name, bases, attrs) | |
./test/test_descr.py: return repr(cls.__name__) | |
./test/test_descr.py: if cls.__mro__ is not None and cls.__name__ == 'B': | |
./test/test_descr.py: if cls.__name__ == 'B1': | |
./test/test_descr.py: if cls.__name__ == 'B2': | |
./test/test_descr.py: if self.ready and cls.__name__ == 'C': | |
./test/test_descr.py: if self.ready and cls.__name__ == 'C': | |
./test/test_descr.py: if cls.__mro__ is None and cls.__name__ != 'X': | |
./test/threaded_import_hangers.py: threading.Thread.__init__(self) | |
./test/test_capi.py: orig_exc_info = _testcapi.set_exc_info(new_exc.__class__, new_exc, None) | |
./test/test_capi.py: self.assertSequenceEqual(orig_exc_info, (raised_exception.__class__, raised_exception, tb)) | |
./test/test_capi.py: self.assertSequenceEqual(new_exc_info, (new_exc.__class__, new_exc, None)) | |
./test/test_urllib2.py: io.StringIO.__init__(self, data) | |
./test/test_urllib2.py: setattr(self.__class__, name, meth) | |
./test/test_urllib2.py: urllib.request.AbstractHTTPHandler.__init__(self) | |
./test/test_urllib2.py: OpenerDirector.__init__(self) | |
./test/test_urllib2.py: self.assertTrue(any(h.__class__ == handler_class | |
./test/test_fractions.py: self.fail("%s not raised" % exc_type.__name__) | |
./test/test_fractions.py: r.__init__(2, 15) | |
./test/test_pkgimport.py: unittest.TestCase.__init__(self, *args, **kw) | |
./test/test_inspect.py: self.assertTrue(predicate(obj), '%s(%s)' % (predicate.__name__, exp)) | |
./test/test_inspect.py: self.assertFalse(other(obj), 'not %s(%s)' % (other.__name__, exp)) | |
./test/test_inspect.py: unittest.TestCase.__init__(self, *args, **kwargs) | |
./test/test_inspect.py: unittest.TestCase.__init__(self, *args, **kwargs) | |
./test/test_inspect.py: GetSourceBase.__init__(self, *args, **kwargs) | |
./test/test_inspect.py: if '__name__' in dir(x) and hasattr(Empty, x.__name__): | |
./test/test_inspect.py: self.__name__ = func.__name__ | |
./test/test_inspect.py: __name__ = func.__name__ | |
./test/test_inspect.py: return super().__new__(mcls, name, bases, dct) | |
./test/test_inspect.py: return super().__new__(mcls, name, bases, dct) | |
./test/test_inspect.py: return super().__new__(mcls, name, bases, dct) | |
./test/test_inspect.py: return super().__init__(name, bases, dct) | |
./test/test_inspect.py: self.assertIn(module.__name__, output) | |
./test/test_collections.py: type(d).__name__ + "({'c': 30}, {'a': 1, 'b': 2})", | |
./test/test_collections.py: type(d).__name__ + "({'c': 30}, {'b': 2, 'a': 1})" | |
./test/test_collections.py: self.assertEqual(Point.__name__, 'Point') | |
./test/test_collections.py: self.assertFalse(issubclass(C, B), B.__name__) | |
./test/test_collections.py: Counter.__init__(self, *args, **kwds) | |
./test/test_collections.py: Counter.__init__(self, *args, **kwds) | |
./test/test_collections.py: c.__init__('a' * 500 + 'b' * 300) | |
./test/test_collections.py: c.__init__('cdc') | |
./test/test_collections.py: c.__init__() | |
./test/test_collections.py: self.assertRaises(TypeError, Counter.__init__) | |
./test/test_syntax.py: self.fail("SyntaxError is not a %s" % subclass.__name__) | |
./test/test_metaclass.py: >>> C.__class__ is type | |
./test/test_metaclass.py: >>> a.__class__ is C | |
./test/test_metaclass.py: >>> C.__class__ is M | |
./test/test_metaclass.py: >>> a.__class__ is C | |
./test/test_metaclass.py: >>> C.__class__ is M | |
./test/test_metaclass.py: >>> a.__class__ is C | |
./test/test_metaclass.py: ... return type.__new__(cls, name, bases, namespace) | |
./test/test_metaclass.py: >>> C.__class__ is M | |
./test/test_metaclass.py: >>> a.__class__ is C | |
./test/test_metaclass.py: >>> C.__class__ is M | |
./test/test_metaclass.py: >>> C.__class__ is M | |
./test/test_float.py: return float.__new__(cls, 2*value) | |
./test/test_threading.py: threading.Thread.__init__(self, name=name) | |
./test/test_generators.py:>>> g.__name__ | |
./test/test_dbm.py: name = module.__name__ | |
./test/test_dbm.py: classes.append(type("TestCase-" + mod.__name__, | |
./test/test_pkg.py: self.assertEqual(t2.__name__, "t2") | |
./test/test_pkg.py: self.assertEqual(t2.sub.__name__, "t2.sub") | |
./test/test_pkg.py: self.assertEqual(t2.sub.subsub.__name__, "t2.sub.subsub") | |
./test/test_pkg.py: self.assertEqual(sub.__name__, "t2.sub") | |
./test/test_pkg.py: self.assertEqual(subsub.__name__, "t2.sub.subsub") | |
./test/test_pkg.py: self.assertEqual(sub.subsub.__name__, "t2.sub.subsub") | |
./test/test_pkg.py: self.assertEqual(t2.__name__, "t2") | |
./test/test_pkg.py: self.assertEqual(t2.sub.__name__, "t2.sub") | |
./test/test_pkg.py: self.assertEqual(t2.sub.subsub.__name__, "t2.sub.subsub") | |
./test/test_pkg.py: self.assertEqual(t3.__name__, "t3") | |
./test/test_pkg.py: self.assertEqual(t3.sub.__name__, "t3.sub") | |
./test/test_pkg.py: self.assertEqual(t3.sub.subsub.__name__, "t3.sub.subsub") | |
./test/pickletester.py: (data, exc.__class__.__name__, exc)) | |
./test/pickletester.py: xname = X.__name__.encode('ascii') | |
./test/pickletester.py: data = exception_pickle.replace(b'?', exc.__name__.encode("ascii")) | |
./test/pickletester.py: self.assertEqual(a.__class__, b.__class__) | |
./test/pickletester.py: o = SimpleNewObj.__new__(SimpleNewObj) | |
./test/pickletester.py: x = object.__new__(SimpleNewObj) # avoid __init__ | |
./test/pickletester.py: raise TypeError("SimpleNewObj.__init__() didn't expect to get called") | |
./test/test_finalization.py: super().__init__() | |
./test/test_urllib2_localnet.py: http.server.HTTPServer.__init__(self, | |
./test/test_urllib2_localnet.py: threading.Thread.__init__(self) | |
./test/test_urllib2_localnet.py: http.server.BaseHTTPRequestHandler.__init__(self, *args, **kwargs) | |
./test/test_urllib2_localnet.py: http.server.BaseHTTPRequestHandler.__init__(self, *args, **kwargs) | |
./test/test_zipimport_support.py: name = "%s.%s" % (obj.__module__, obj.__name__) | |
./test/test_zipimport_support.py: name = module.__name__ | |
./test/test_zipimport_support.py: print ('doctest (%s) ... %d tests with zero failures' % (module.__name__, t)) | |
./test/test_zipimport_support.py: mod_name = mod.__name__.split(".")[-1] | |
./test/test_zipimport_support.py: test_zipped_doctest.SampleClass.NestedClass.__init__, | |
./test/test_zipimport_support.py: test_zipped_doctest.SampleClass.__init__, | |
./test/test_zipimport_support.py: test_zipped_doctest.SampleNewStyleClass.__init__, | |
./test/test_profile.py: (method, self.profilerclass.__name__)) | |
./test/test_xml_etree_c.py: self.assertNotIsInstance(cET.Element.__init__, types.FunctionType) | |
./test/test_socket.py: super().__init__(*args, **kwargs) | |
./test/test_socket.py: SocketTCPTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_socket.py: SocketUDPTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_socket.py: SocketCANTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_socket.py: SocketRDSTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_socket.py: ThreadedTCPSocketTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: unittest.TestCase.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_socket.py: super().__init__(*args, **kwargs) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_socket.py: ThreadedCANSocketTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadedRDSSocketTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: SocketConnectedTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadedUDPSocketTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: SocketPairTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadedTCPSocketTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: SocketConnectedTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: SocketTCPTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_socket.py: SocketTCPTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_socket.py: SocketConnectedTest.__init__(self, methodName=methodName) | |
./test/test_socket.py: unittest.TestCase.__init__(self, methodName = methodName) | |
./test/test_socket.py: ThreadableTest.__init__(self) | |
./test/test_memoryio.py: memio.__init__(buf * 2) | |
./test/test_memoryio.py: memio.__init__(buf) | |
./test/test_memoryio.py: self.assertRaises(TypeError, memio.__init__, []) | |
./test/test_memoryio.py: self.ioclass.__init__(me, a) | |
./test/test_memoryio.py: self.ioclass.__init__(me, initvalue) | |
./test/test_memoryio.py: PickleTestMemIO.__qualname__ = PickleTestMemIO.__name__ | |
./test/test_memoryio.py: self.assertEqual(obj.__class__, obj2.__class__) | |
./test/test_isinstance.py: # - inst.__class__ as no __bases__ attribute | |
./test/test_isinstance.py: # Like above except that inst.__class__.__bases__ raises an exception | |
./test/test_argparse.py: return '%s(%s)' % (type(self).__name__, kwarg_str) | |
./test/test_argparse.py: Exception.__init__(self, message, stdout, stderr) | |
./test/test_argparse.py: add_arguments_name = self._add_arguments.__name__ | |
./test/test_argparse.py: parse_args_name = self._parse_args.__name__ | |
./test/test_argparse.py: func_name = test_func.__name__ | |
./test/test_argparse.py: wrapper.__name__ = test_name | |
./test/test_argparse.py: test_name = '%s_%s' % (test_func.__name__, func_suffix) | |
./test/test_argparse.py: test_wrapper.__name__ = test_name | |
./test/test_typechecks.py: for c in {type(inst), inst.__class__}) | |
./test/test_uu.py: super(FakeIO, self).__init__(io.BytesIO(), | |
./test/test_queue.py: threading.Thread.__init__(self) | |
./test/test_queue.py: self.assertEqual(actual_order, target_order[q.__class__.__name__], | |
./test/test_queue.py: queue.Queue.__init__(self, *args) | |
./test/test_struct.py: super(IntTester, self).__init__(methodName='test_one') | |
./test/test_struct.py: s.__init__('ii') | |
./test/test_doctest2.py: """C.__init__. | |
./test/test_iter.py: return object.__new__(cls) | |
./test/test_iter.py: cls = self.__class__ | |
./test/test_descrtut.py: dict.__init__(self) | |
./test/test_descrtut.py: >>> print(a.__class__) # show its class | |
./test/test_descrtut.py: >>> print(type(a) is a.__class__) # its type is its class | |
./test/test_descrtut.py: dict.__init__(self) | |
./test/test_descrtut.py:For instance of built-in types, x.__class__ is now the same as type(x): | |
./test/test_descrtut.py: >>> [].__class__ | |
./test/test_index.py: return self.__class__(self._list*n) | |
./test/_test_multiprocessing.py: multiprocessing.Process.__init__(self) | |
./test/_test_multiprocessing.py: modules.remove('multiprocessing.__init__') | |
./test/_test_multiprocessing.py:# Test Manager.start()/Pool.__init__() initializer feature - see issue 5585 | |
./test/_test_multiprocessing.py: self.assertTrue(type(ctx).__name__.lower().startswith(method)) | |
./test/_test_multiprocessing.py: ctx.Process.__name__.lower().startswith(method)) | |
./test/_test_multiprocessing.py: Temp.__name__ = Temp.__qualname__ = newname | |
./test/_test_multiprocessing.py: Temp.__name__ = Temp.__qualname__ = name | |
./test/test_sys_setprofile.py: HookWatcher.__init__(self) | |
./test/test_userdict.py: self.assertRaises(TypeError, collections.UserDict.__init__) | |
./test/test_userdict.py: collections.UserDict.__init__(self) | |
./test/test___all__.py: modname, e.__class__.__name__, e)) | |
./test/test_doctest.py: 1 SampleClass.NestedClass.__init__ | |
./test/test_doctest.py: 1 SampleClass.__init__ | |
./test/test_doctest.py: 1 SampleNewStyleClass.__init__ | |
./test/test_doctest.py: 1 some_module.SampleClass.NestedClass.__init__ | |
./test/test_doctest.py: 1 some_module.SampleClass.__init__ | |
./test/test_doctest.py: 1 SampleClass.NestedClass.__init__ | |
./test/test_doctest.py: 1 SampleClass.__init__ | |
./test/test_doctest.py: 1 SampleClass.NestedClass.__init__ | |
./test/test_doctest.py: 1 SampleClass.__init__ | |
./test/test_asyncore.py: asyncore.dispatcher.__init__(self, sock) | |
./test/test_asyncore.py: asyncore.dispatcher.__init__(self) | |
./test/test_asyncore.py: BaseTestHandler.__init__(self) | |
./test/test_asyncore.py: BaseTestHandler.__init__(self) | |
./test/test_asyncore.py: BaseTestHandler.__init__(self) | |
./test/test_asyncore.py: BaseTestHandler.__init__(self, conn) | |
./test/test_asyncore.py: BaseTestHandler.__init__(self, conn) | |
./test/test_asyncore.py: BaseTestHandler.__init__(self, conn) | |
./test/test_copy.py: self.assertEqual(y.__class__, x.__class__) | |
./test/test_copy.py: obj = object.__new__(cls) | |
./test/test_copy.py: self.assertEqual(y.__class__, x.__class__) | |
./test/test_copy.py: obj = object.__new__(cls) | |
./test/test_copy.py: self.assertIs(y.__class__, x.__class__) | |
./test/test_copy.py: self.assertIs(y.__class__, x.__class__) | |
./test/test_copy.py: super().__init__(d) | |
./test/test_io.py: super().__init__(data) | |
./test/test_io.py: # .__init__() must not close f1 | |
./test/test_io.py: fileio.__init__(f2.fileno(), closefd=False) | |
./test/test_io.py: clsname = "%s.%s" % (self.tp.__module__, self.tp.__name__) | |
./test/test_io.py: bufio.__init__(rawio) | |
./test/test_io.py: bufio.__init__(rawio, buffer_size=1024) | |
./test/test_io.py: bufio.__init__(rawio, buffer_size=16) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1) | |
./test/test_io.py: bufio.__init__(rawio) | |
./test/test_io.py: bufio = self.tp.__new__(self.tp) | |
./test/test_io.py: bufio = self.tp.__new__(self.tp) | |
./test/test_io.py: bufio.__init__(self.MockRawIO()) | |
./test/test_io.py: bufio.__init__, rawio, sys.maxsize) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1) | |
./test/test_io.py: bufio.__init__(rawio) | |
./test/test_io.py: bufio.__init__(rawio, buffer_size=1024) | |
./test/test_io.py: bufio.__init__(rawio, buffer_size=16) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1) | |
./test/test_io.py: bufio.__init__(rawio) | |
./test/test_io.py: bufio = self.tp.__new__(self.tp) | |
./test/test_io.py: bufio = self.tp.__new__(self.tp) | |
./test/test_io.py: bufio.__init__(self.MockRawIO()) | |
./test/test_io.py: bufio.__init__, rawio, sys.maxsize) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16) | |
./test/test_io.py: self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1) | |
./test/test_io.py: pair = self.tp.__new__(self.tp) | |
./test/test_io.py: pair = self.tp.__new__(self.tp) | |
./test/test_io.py: pair.__init__(self.MockRawIO(), self.MockRawIO()) | |
./test/test_io.py: MockRawIO.__init__(self) | |
./test/test_io.py: bufio.__init__, rawio, sys.maxsize) | |
./test/test_io.py: codecs.IncrementalDecoder.__init__(self, errors) | |
./test/test_io.py: t.__init__(b, encoding="latin-1", newline="\r\n") | |
./test/test_io.py: t.__init__(b, encoding="utf-8", line_buffering=True) | |
./test/test_io.py: self.assertRaises(TypeError, t.__init__, b, newline=42) | |
./test/test_io.py: self.assertRaises(ValueError, t.__init__, b, newline='xyzzy') | |
./test/test_io.py: t = self.TextIOWrapper.__new__(self.TextIOWrapper) | |
./test/test_io.py: t = self.TextIOWrapper.__new__(self.TextIOWrapper) | |
./test/test_io.py: t.__init__(self.MockRawIO()) | |
./test/test_io.py: iomod = self.io.__name__ | |
./test/test_io.py: self.assertRaises(TypeError, t.__init__, b, newline=42) | |
./test/test_io.py: self.assertRaises(ValueError, t.__init__, b, newline='xyzzy') | |
./test/test_io.py: t = self.TextIOWrapper.__new__(self.TextIOWrapper) | |
./test/test_io.py: c_io_ns.update((x.__name__, globs["C" + x.__name__]) for x in mocks) | |
./test/test_io.py: py_io_ns.update((x.__name__, globs["Py" + x.__name__]) for x in mocks) | |
./test/test_io.py: if test.__name__.startswith("C"): | |
./test/test_io.py: elif test.__name__.startswith("Py"): | |
./test/test_gettext.py: self.assertEqual(t.__class__, DummyGNUTranslations) | |
./test/test_gettext.py: self.assertEqual(t.__class__, DummyGNUTranslations) | |
./test/test_dict.py: return hash(self.__class__) | |
./test/test_dict.py: if isinstance(other, self.__class__): | |
./test/test_ftplib.py: asynchat.async_chat.__init__(self, conn) | |
./test/test_ftplib.py: asynchat.async_chat.__init__(self, conn) | |
./test/test_ftplib.py: threading.Thread.__init__(self) | |
./test/test_ftplib.py: asyncore.dispatcher.__init__(self) | |
./test/test_ftplib.py: DummyDTPHandler.__init__(self, conn, baseclass) | |
./test/test_ftplib.py: DummyFTPHandler.__init__(self, conn) | |
./test/test_json/test_encode_basestring_ascii.py: fname = self.json.encoder.encode_basestring_ascii.__name__ | |
./test/test_logging.py: smtpd.SMTPServer.__init__(self, addr, None, map=sockmap) | |
./test/test_logging.py: HTTPServer.__init__(self, addr, DelegatingHTTPRequestHandler) | |
./test/test_logging.py: ControlMixin.__init__(self, handler, poll_interval) | |
./test/test_logging.py: ThreadingTCPServer.__init__(self, addr, DelegatingTCPRequestHandler, | |
./test/test_logging.py: ControlMixin.__init__(self, handler, poll_interval) | |
./test/test_logging.py: ThreadingUDPServer.__init__(self, addr, | |
./test/test_logging.py: ControlMixin.__init__(self, handler, poll_interval) | |
./test/test_logging.py: return "Got a [%s]" % ei[0].__name__ | |
./test/test_logging.py: super(RecordingHandler, self).__init__(*args, **kwargs) | |
./test/test_logging.py: (exc.__class__, exc, exc.__traceback__)) | |
./test/test_logging.py: (exc.__class__, exc, exc.__traceback__)) | |
./test/test_funcattrs.py: self.assertEqual(c[0].__class__.__name__, "cell") | |
./test/test_funcattrs.py: self.assertEqual(self.b.__name__, 'b') | |
./test/test_funcattrs.py: self.b.__name__ = 'c' | |
./test/test_funcattrs.py: self.assertEqual(self.b.__name__, 'c') | |
./test/test_funcattrs.py: self.b.__name__ = 'd' | |
./test/test_funcattrs.py: self.assertEqual(self.b.__name__, 'd') | |
./test/test_funcattrs.py: s = """def f(): pass\nf.__name__""" | |
./test/test_funcattrs.py: self.assertEqual(self.fi.a.__name__, 'a') | |
./test/test_funcattrs.py: self.assertEqual(self.fi.a.__self__.__class__, self.F) | |
./test/test_quopri.py: newtest.__name__ = testfunc.__name__ | |
./test/test_unicode.py: return str.__new__(cls, 2*content) | |
./test/test_tarfile.py: tar = object.__new__(tarfile.TarFile) | |
./test/test_tarfile.py: tar.__init__(empty) | |
./test/test_string.py: string.Formatter.__init__(self) | |
./test/test_class.py: callLst.append((f.__name__, args)) | |
./test/test_class.py: self.fail("attribute error for I.__init__ got masked") | |
./test/test_faulthandler.py: Thread.__init__(self) | |
./test/test_ssl.py: threading.Thread.__init__(self) | |
./test/test_ssl.py: threading.Thread.__init__(self) | |
./test/test_ssl.py: asyncore.dispatcher_with_send.__init__(self, self.socket) | |
./test/test_ssl.py: asyncore.dispatcher.__init__(self, sock) | |
./test/test_ssl.py: threading.Thread.__init__(self) | |
./test/test_ssl.py: return "<%s %s>" % (self.__class__.__name__, self.server) | |
./test/test_asynchat.py: threading.Thread.__init__(self) | |
./test/test_asynchat.py: asynchat.async_chat.__init__(self) | |
./test/test_gc.py: # Tricky: self.__init__ is a bound method, it references the instance. | |
./test/test_gc.py: self.init = self.__init__ | |
./test/test_fileinput.py: UnconditionallyRaise.__init__(self, ValueError) | |
./test/test_fileinput.py: fileinput.FileInput.__init__(). Note that this test depends on the | |
./test/test_fileinput.py: # to FileInput.__init__() | |
./test/test_array.py: array.array.__init__(self) | |
./test/test_array.py: return array.array.__new__(cls, typecode, data) | |
./test/test_pkgutil.py: '<%s>' % loader.__class__.__name__, | |
./test/test_pkgutil.py: self.create_module('a.pkg.__init__', pkgutil_boilerplate) | |
./test/test_pkgutil.py: self.create_module('b.pkg.__init__', pkgutil_boilerplate) | |
./test/test_pkgutil.py: self.create_module('a.pkg.subpkg.__init__', pkgutil_boilerplate) | |
./test/test_pkgutil.py: self.create_module('b.pkg.subpkg.__init__', pkgutil_boilerplate) | |
./test/test_httplib.py: FakeSocket.__init__(self, text) | |
./test/test_httplib.py: list.__init__(self) | |
./test/test_httplib.py: client.HTTPResponse.__init__(self, *pos, **kw) | |
./test/reperf.py: print(func.__name__, "%.3f" % (t1-t0), "CPU seconds") | |
./test/test_pep380.py: trace.append("%s: %s" % (e.__class__.__name__, e)) | |
./test/test_xmlrpc.py: self.__class__.content_length = int(self.headers["content-length"]) | |
./test/test_xmlrpc.py: # SimpleXMLRPCDispatcher.__init__ accepts use_builtin_types, which | |
./test/test_xml_etree.py: self = str.__new__(cls, *args) | |
./test/test_xml_etree.py: super(MyElement, self).__init__(tag + '__', attrib, **extra) | |
./test/test_xml_etree.py: self.assertIsInstance(pyET.Element.__init__, types.FunctionType) | |
./test/test_xml_etree.py: self.assertIsInstance(pyET.XMLParser.__init__, types.FunctionType) | |
./test/test_wsgiref.py: BaseServer.__init__(self, server_address, RequestHandlerClass) | |
./test/test_wsgiref.py: BaseCGIHandler.__init__( | |
./test/test_reprlib.py: self.assertEqual(repr(module), "<module %r from %r>" % (module.__name__, module.__file__)) | |
./test/test_reprlib.py: "<class '%s.foo'>" % foo.__name__) | |
./test/test_reprlib.py: self.assertEqual(repr(bar.bar), "<class '%s.bar'>" % bar.__name__) | |
./test/test_reprlib.py: "<%s.baz object at 0x" % baz.__name__)) | |
./test/test_reprlib.py: % (qux.__name__,) ), r) | |
./test/test_smtplib.py: super(SimSMTPChannel, self).__init__(*args, **kw) | |
./test/test_smtplib.py: smtpd.SMTPServer.__init__(self, *args, **kw) | |
./test/string_tests.py: return self.__class__.type2test(obj) | |
./test/string_tests.py: class subtype(self.__class__.type2test): | |
./test/test_weakset.py: s.__init__(self.items) | |
./test/test_weakset.py: s.__init__(self.items2) | |
./test/test_weakset.py: self.assertRaises(TypeError, s.__init__, s, 2); | |
./test/test_weakset.py: self.assertRaises(TypeError, s.__init__, 1); | |
./test/test_hashlib.py: super(HashLibTestCase, self).__init__(*args, **kwargs) | |
./test/test_asyncio/test_tasks.py: self.assertEqual(notmuch.__name__, 'notmuch') | |
./test/test_asyncio/test_tasks.py: self.assertEqual(gen.__name__, 'notmuch') | |
./test/test_asyncio/test_tasks.py: self.assertEqual(notmuch.__name__, 'notmuch') | |
./test/test_asyncio/test_tasks.py: self.assertEqual(gen.__name__, coro_name) | |
./test/test_asyncio/test_tasks.py: super().__init__(*args, **kwds) | |
./test/test_asyncio/test_events.py: self.assertTrue('ssl' in tr.__class__.__name__.lower()) | |
./test/test_asyncio/test_events.py: super().__init__(loop=self.loop) | |
./test/test_asyncio/test_events.py: 'selector': self.loop._selector.__class__.__name__}) | |
./test/test_asyncio/echo3.py: os.write(2, b'ERR:' + ex.__class__.__name__.encode('ascii')) | |
./test/test_asyncio/test_selector_events.py: class_name = transport.__class__.__name__ | |
./test/test_dis.py:""" % (_C.__init__.__code__.co_firstlineno + 1,) | |
./test/test_dis.py: self.do_disassembly_test(_C(1).__init__, dis_c_instance_method) | |
./test/test_dis.py: method_bytecode = _C(1).__init__.__code__.co_code | |
./test/test_dis.py: for obj in [_f, _C(1).__init__, "a=1", _f.__code__]: | |
./test/test_dis.py: for obj in [_f, _C(1).__init__, "a=1", _f.__code__]: | |
./test/test_pep3151.py: super().__init__(message) | |
./test/test_pep3151.py: self = super().__new__(cls, message) | |
./test/test_pep3151.py: self.assertEqual(OSError.__name__, 'OSError') | |
./test/test_pep3151.py: # __init__ doesn't propagate to OSError.__init__ (see issue #15229) | |
./test/test_httpservers.py: threading.Thread.__init__(self) | |
./test/support/__init__.py:# reason = 'Tk unavailable due to {}: {}'.format(type(e).__name__, | |
./test/support/__init__.py:# issubclass(warning.__class__, cat)): | |
./test/support/__init__.py:# missing.append((msg, cat.__name__)) | |
./test/support/__init__.py:# if module.__name__ != module_name: | |
./test/support/__init__.py:# del sys.modules[module.__name__] | |
./test/support/__init__.py:# inner.__name__ = func.__name__ | |
./test/support/__init__.py:# inner.__name__ = func.__name__ | |
./test/support/__init__.py:# (module.__name__, t)) | |
./test/support/__init__.py:# logging.handlers.BufferingHandler.__init__(self, 0) | |
./test/test_mailbox.py: mailbox.Mailbox.__init__(self, '', lambda file: None) | |
./test/test_poplib.py: asynchat.async_chat.__init__(self, conn) | |
./test/test_poplib.py: threading.Thread.__init__(self) | |
./test/test_poplib.py: asyncore.dispatcher.__init__(self) | |
./test/test_poplib.py: asynchat.async_chat.__init__(self, conn) | |
./test/test_configparser.py: % (exc.__module__, exc.__name__)) | |
./test/test_bytes.py: self.assertEqual(b.__class__, self.type2test) | |
./test/test_bytes.py: b.__init__(g()) | |
./test/test_bytes.py: bytearray.__init__(me, *args, **kwargs) | |
./test/test_random.py: msg='%s%r' % (variate.__name__, args)) | |
./test/test_random.py: msg='%s%r' % (variate.__name__, args)) | |
./test/test_random.py: random.Random.__init__(self) | |
./test/test_ordered_dict.py: self.assertRaises(TypeError, OrderedDict.__init__) | |
./test/test_ordered_dict.py: d.__init__([('e', 5), ('f', 6)], g=7, d=4) | |
./test/test_property.py: self.assertEqual(sub.__class__.spam.__doc__, "SubClass.getter") | |
./test/test_property.py: self.assertEqual(base.__class__.spam.__doc__, "BaseClass.getter") | |
./test/test_property.py: self.assertEqual(base.__class__.spam.__doc__, "spam spam spam") | |
./test/test_property.py: self.assertEqual(sub.__class__.spam.__doc__, "spam spam spam") | |
./test/test_property.py: self.assertEqual(newgettersub.__class__.spam.__doc__, "new docstring") | |
./test/test_property.py: self.assertEqual(newgetter.__class__.spam.__doc__, "new docstring") | |
./test/datetimetester.py: FixedOffset.__init__(self, offset, name, dstoffset) | |
./test/datetimetester.py: orig = tzinfo.__new__(tzinfo) | |
./test/datetimetester.py: name = 'datetime.' + self.theclass.__name__ | |
./test/datetimetester.py: result = self.theclass.__new__(cls, *args, **temp) | |
./test/datetimetester.py: self.assertEqual(dt2.__class__, C) | |
./test/datetimetester.py: result = self.theclass.__new__(cls, *args, **temp) | |
./test/datetimetester.py: self.assertEqual(dt2.__class__, C) | |
./test/datetimetester.py: name = 'datetime.' + self.theclass.__name__ | |
./test/datetimetester.py: result = self.theclass.__new__(cls, *args, **temp) | |
./test/datetimetester.py: self.assertEqual(dt2.__class__, C) | |
./test/datetimetester.py: result = self.theclass.__new__(cls, *args, **temp) | |
./test/datetimetester.py: self.assertEqual(dt2.__class__, C) | |
./test/datetimetester.py: DST.__init__(self, dofs) | |
./test/datetimetester.py: result = self.theclass.__new__(cls, *args, **temp) | |
./test/datetimetester.py: self.assertEqual(dt2.__class__, C) | |
./test/test_os.py: asynchat.async_chat.__init__(self, conn) | |
./test/test_os.py: threading.Thread.__init__(self) | |
./test/test_os.py: asyncore.dispatcher.__init__(self) | |
./test/test_email/test_parser.py: super().__init__() | |
./test/test_email/test_policy.py: super().__init__(*args, defects=[], **kw) | |
./test/test_email/test_email.py: super().__init__() | |
./test/test_email/__init__.py: super().__init__(*args, **kw) | |
./test/test_email/__init__.py: test.__name__ = testname | |
./test/test_subprocess.py: argcount = subprocess.Popen.__init__.__code__.co_argcount | |
./test/test_subprocess.py: subprocess.Popen.__init__(self, *args, **kwargs) | |
./test/test_cgi.py: return (self.err.__class__ == anExc.__class__ and | |
./test/test_import.py: self.assertIs(x, test, x.__name__) | |
./test/test_import.py: self.assertIs(y, test.support, y.__name__) | |
./test/test_import.py: self.assertEqual(mod.__name__, 'importlib._bootstrap') | |
./test/test_pydoc.py: self.assertEqual(loaded_pydoc.__name__, 'pydoc') | |
./test/test_decorators.py: Exception.__init__(self, "dbcheck %r failed (func=%s args=%s kwds=%s)" % | |
./test/test_decorators.py: expr = compile(exprstr, "dbcheck-%s" % func.__name__, "eval") | |
./test/test_decorators.py: func_name = func.__name__ | |
./test/test_decorators.py: call.__name__ = func_name | |
./test/test_decorators.py: call.__name__ = func.__name__ | |
./test/test_decorators.py: self.assertEqual(double.__name__, 'double') | |
./test/test_codecs.py: operation, self.codec_name, exc_type.__name__, msg) | |
./test/test_codecs.py: return super().__new__(cls) | |
./timeit.py:# in Timer.__init__() depend on setup being indented 4 spaces and stmt | |
./wsgiref/handlers.py: BaseCGIHandler.__init__( | |
./wsgiref/handlers.py: BaseCGIHandler.__init__( | |
./mailbox.py: Mailbox.__init__(self, dirname, factory, create) | |
./mailbox.py: Mailbox.__init__(self, path, factory, create) | |
./mailbox.py: _mboxMMDF.__init__(self, path, factory, create) | |
./mailbox.py: _mboxMMDF.__init__(self, path, factory, create) | |
./mailbox.py: Mailbox.__init__(self, path, factory, create) | |
./mailbox.py: _singlefileMailbox.__init__(self, path, factory, create) | |
./mailbox.py: email.message.Message.__init__(self) | |
./mailbox.py: Message.__init__(self, message) | |
./mailbox.py: Message.__init__(self, message) | |
./mailbox.py: Message.__init__(self, message) | |
./mailbox.py: Message.__init__(self, message) | |
./mailbox.py: _ProxyFile.__init__(self, f, start) | |
./unittest/loader.py: super(_FailedTest, self).__init__(method_name) | |
./unittest/loader.py: return _make_failed_load_tests(module.__name__, e, | |
./unittest/loader.py: (path.split(the_module.__name__ | |
./unittest/loader.py: elif the_module.__name__ in sys.builtin_module_names: | |
./unittest/loader.py: yield _make_failed_load_tests(package.__name__, e, | |
./unittest/runner.py: super(TextTestResult, self).__init__(stream, descriptions, verbosity) | |
./unittest/util.py: return "%s.%s" % (cls.__module__, cls.__name__) | |
./unittest/result.py: (util.strclass(self.__class__), self.testsRun, len(self.errors), | |
./unittest/case.py: _BaseTestCaseContext.__init__(self, test_case) | |
./unittest/case.py: self.obj_name = callable_obj.__name__ | |
./unittest/case.py: exc_name = self.expected.__name__ | |
./unittest/case.py: exc_name = self.expected.__name__ | |
./unittest/case.py: logging.Handler.__init__(self) | |
./unittest/case.py: _BaseTestCaseContext.__init__(self, test_case) | |
./unittest/case.py: (self.__class__, methodName)) | |
./unittest/case.py: return "%s.%s" % (strclass(self.__class__), self._testMethodName) | |
./unittest/case.py: return "%s (%s)" % (self._testMethodName, strclass(self.__class__)) | |
./unittest/case.py: (strclass(self.__class__), self._testMethodName) | |
./unittest/case.py: if (getattr(self.__class__, "__unittest_skip__", False) or | |
./unittest/case.py: skip_why = (getattr(self.__class__, '__unittest_skip_why__', '') | |
./unittest/case.py: seq_type_name = seq_type.__name__ | |
./unittest/case.py: 'Please use {0} instead.'.format(original_func.__name__), | |
./unittest/case.py: super(FunctionTestCase, self).__init__() | |
./unittest/case.py: return self._testFunc.__name__ | |
./unittest/case.py: if not isinstance(other, self.__class__): | |
./unittest/case.py: return "%s (%s)" % (strclass(self.__class__), | |
./unittest/case.py: self._testFunc.__name__) | |
./unittest/case.py: return "<%s tec=%s>" % (strclass(self.__class__), | |
./unittest/case.py: super().__init__() | |
./unittest/suite.py: return "<%s tests=%s>" % (util.strclass(self.__class__), list(self)) | |
./unittest/suite.py: if not isinstance(other, self.__class__): | |
./unittest/suite.py: result._previousTestClass = test.__class__ | |
./unittest/suite.py: if (getattr(test.__class__, '_classSetupFailed', False) or | |
./unittest/suite.py: currentClass = test.__class__ | |
./unittest/suite.py: currentModule = test.__class__.__module__ | |
./unittest/suite.py: currentClass = test.__class__ | |
./unittest/test/test_discovery.py: program = object.__new__(unittest.TestProgram) | |
./unittest/test/test_runner.py: super(AResult, self).__init__(stream, descriptions, verbosity) | |
./unittest/test/test_runner.py: super(Runner, self).__init__(io.StringIO()) | |
./unittest/test/test_runner.py: super(LoggingRunner, self).__init__(io.StringIO()) | |
./unittest/test/test_suite.py: ### Tests for TestSuite.__init__ | |
./unittest/test/test_suite.py: ### /Tests for TestSuite.__init__ | |
./unittest/test/testmock/testmock.py: self.assertRaises(AttributeError, lambda: mock.__name__) | |
./unittest/test/testmock/testmock.py: mock.__name__ = 'foo' | |
./unittest/test/testmock/testmock.py: self.assertEqual(mock.__name__, 'foo') | |
./unittest/test/testmock/testmock.py: self.assertIs(mock.__class__, X) | |
./unittest/test/testmock/testmock.py: self.assertEqual(Mock().__class__.__name__, 'Mock') | |
./unittest/test/testmock/testmock.py: mock.__class__ = int | |
./unittest/test/testmock/testcallable.py: self.assertIn(mock.__class__.__name__, repr(mock)) | |
./unittest/test/testmock/testhelpers.py: # due to trying to get a signature from object.__init__ | |
./unittest/test/testmock/testpatch.py: self.assertEqual(some_name.__name__, 'some_name') | |
./unittest/test/test_case.py: super(Test.LoggingTestCase, self).__init__('test') | |
./unittest/test/test_case.py: Exception.__init__(self) | |
./unittest/test/support.py: super().__init__() | |
./unittest/mock.py: func = func.__init__ | |
./unittest/mock.py: funcopy.__name__ = func.__name__ | |
./unittest/mock.py: name = original.__name__ | |
./unittest/mock.py: new = type(cls.__name__, (cls,), {'__doc__': cls.__doc__}) | |
./unittest/mock.py: instance = object.__new__(new) | |
./unittest/mock.py: _safe_super(NonCallableMock, self).__init__( | |
./unittest/mock.py: spec_string = spec_string % self._spec_class.__name__ | |
./unittest/mock.py: type(self).__name__, | |
./unittest/mock.py: _safe_super(CallableMixin, self).__init__( | |
./unittest/mock.py: `mock.__class__` returns the class of the spec object. This allows mocks | |
./unittest/mock.py: method.__name__ = name | |
./unittest/mock.py: _safe_super(MagicMixin, self).__init__(*args, **kw) | |
./unittest/mock.py: return tuple.__new__(cls, (args, kwargs)) | |
./unittest/mock.py: return tuple.__new__(cls, (name, args, kwargs)) | |
./unittest/mock.py: spec = spec.__class__ | |
./unittest/mock.py: return obj.__class__ | |
./_markupbase.py: if self.__class__ is ParserBase: | |
./configparser.py: Exception.__init__(self, msg) | |
./configparser.py: Error.__init__(self, 'No section: %r' % (section,)) | |
./configparser.py: Error.__init__(self, "".join(msg)) | |
./configparser.py: Error.__init__(self, "".join(msg)) | |
./configparser.py: Error.__init__(self, "No option %r in section: %r" % | |
./configparser.py: Error.__init__(self, msg) | |
./configparser.py: InterpolationError.__init__(self, option, section, msg) | |
./configparser.py: InterpolationError.__init__(self, option, section, msg) | |
./configparser.py: Error.__init__(self, 'Source contains parsing errors: %r' % source) | |
./configparser.py: Error.__init__( | |
./configparser.py: super().__init__(*args, **kwargs) | |
./code.py: InteractiveInterpreter.__init__(self, locals) | |
./code.py: self.__class__.__name__)) | |
./code.py: local -- passed to InteractiveInterpreter.__init__() | |
./macpath.py: "not '{}'".format(path.__class__.__name__)) | |
./functools.py: opfunc.__name__ = opname | |
./functools.py: return format_string.format(module=self.__class__.__module__, | |
./functools.py: cls=self.__class__.__name__, | |
./functools.py: return dispatch(args[0].__class__)(*args, **kw) | |
./calendar.py: TextCalendar.__init__(self, firstweekday) | |
./calendar.py: HTMLCalendar.__init__(self, firstweekday) | |
./posixpath.py: "not '{}'".format(s.__class__.__name__)) | |
./smtplib.py: SMTP.__init__(self, host, port, local_hostname, timeout, | |
./smtplib.py: SMTP.__init__(self, host, port, local_hostname=local_hostname, | |
./base64.py: "string, not %r" % s.__class__.__name__) from None | |
./base64.py: msg = "expected bytes-like object, not %s" % s.__class__.__name__ | |
./base64.py: (m.format, s.__class__.__name__)) | |
./base64.py: (m.ndim, s.__class__.__name__)) | |
./imp.py: super().__init__(fullname, path) | |
./poplib.py: POP3.__init__(self, host, port, timeout) | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ | |
pi@agl:~/circuitpython/stdlib/CPython-Lib-v3.4.9$ grep -RE "\.encode\(|\.decode\(" . | |
./sre_parse.py: literals = [None if s is None else s.encode('latin-1') for s in literals] | |
./ntpath.py: userhome = userhome.encode(sys.getfilesystemencoding()) | |
./getpass.py: prompt = prompt.encode(stream.encoding, 'replace') | |
./getpass.py: prompt = prompt.decode(stream.encoding) | |
./subprocess.py: data = data.decode(encoding) | |
./subprocess.py: builtins, exception_name.decode('ascii'), | |
./subprocess.py: err_msg = err_msg.decode(errors="surrogatepass") | |
./subprocess.py: self._input = self._input.encode(self.stdin.encoding) | |
./imaplib.py: pwd = (self.password.encode('ASCII') if isinstance(self.password, str) | |
./imaplib.py: raise self.abort(bye[-1].decode('ascii', 'replace')) | |
./imaplib.py: ret = self.mech(self.decode(data)) | |
./imaplib.py: return self.encode(ret) | |
./imaplib.py: inp = inp.encode('ASCII') | |
./imaplib.py:Mon2num = {s.encode():n+1 for n, s in enumerate(Months[1:])} | |
./_osx_support.py: return fp.read().decode('utf-8').strip() if not os.system(cmd) else None | |
./ctypes/test/test_bitfields.py: self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) | |
./ctypes/test/test_bitfields.py: self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) | |
./ctypes/test/test_array_in_pointer.py: h = hexlify(memoryview(obj)).decode() | |
./ctypes/test/test_byteswap.py: return hexlify(memoryview(s)).decode().upper() | |
./pathlib.py: drive, urlquote_from_bytes(rest.encode('utf-8'))) | |
./pathlib.py: return 'file:' + urlquote_from_bytes(path.as_posix().encode('utf-8')) | |
./pydoc_data/topics.py: 'str.encode(encoding="utf-8", errors="strict")\n' | |
./pydoc_data/topics.py: ' "1" string object. "str.encode()" can be used to convert ' | |
./pydoc_data/topics.py: ' "bytes.decode()" can be used to achieve the opposite.\n' | |
./gettext.py: for b_item in tmsg.split('\n'.encode("ascii")): | |
./gettext.py: item = b_item.decode().strip() | |
./gettext.py: return tmsg.encode(self._output_charset) | |
./gettext.py: return tmsg.encode(locale.getpreferredencoding()) | |
./gettext.py: return tmsg.encode(self._output_charset) | |
./gettext.py: return tmsg.encode(locale.getpreferredencoding()) | |
./os.py: return value.encode(encoding, 'surrogateescape') | |
./os.py: return value.decode(encoding, 'surrogateescape') | |
./os.py: return filename.encode(encoding, errors) | |
./os.py: return filename.decode(encoding, errors) | |
./multiprocessing/connection.py: return xmlrpclib.dumps((obj,), None, None, None, 1).encode('utf-8') | |
./multiprocessing/connection.py: (obj,), method = xmlrpclib.loads(s.decode('utf-8')) | |
./multiprocessing/semaphore_tracker.py: msg = '{0}:{1}\n'.format(cmd, name).encode('ascii') | |
./multiprocessing/semaphore_tracker.py: name = name.decode('ascii') | |
./http/client.py: hstring = b''.join(headers).decode('iso-8859-1') | |
./http/client.py: connect_bytes = connect_str.encode("ascii") | |
./http/client.py: header_bytes = header_str.encode("latin-1") | |
./http/client.py: datablock = datablock.encode("iso-8859-1") | |
./http/client.py: self._output(request.encode('ascii')) | |
./http/client.py: netloc_enc = netloc.encode("ascii") | |
./http/client.py: netloc_enc = netloc.encode("idna") | |
./http/client.py: host_enc = host.encode("ascii") | |
./http/client.py: host_enc = host.encode("idna") | |
./http/client.py: host_enc = host_enc.decode("ascii") | |
./http/client.py: header = header.encode('ascii') | |
./http/client.py: values[i] = one_value.encode('latin-1') | |
./http/client.py: values[i] = str(one_value).encode('ascii') | |
./http/client.py: body = body.encode('iso-8859-1') | |
./http/server.py: body = content.encode('UTF-8', 'replace') | |
./http/server.py: (self.protocol_version, code, message)).encode( | |
./http/server.py: ("%s: %s\r\n" % (keyword, value)).encode('latin-1', 'strict')) | |
./http/server.py: encoded = '\n'.join(r).encode(enc, 'surrogateescape') | |
./http/server.py: authorization = authorization[1].encode('ascii') | |
./telnetlib.py: sys.stdout.write(text.decode('ascii')) | |
./telnetlib.py: line = sys.stdin.readline().encode('ascii') | |
./telnetlib.py: self.write(line.encode('ascii')) | |
./telnetlib.py: sys.stdout.write(data.decode('ascii')) | |
./doctest.py: file_contents = file_contents.decode(encoding) | |
./doctest.py: s = str(s.encode(encoding, 'backslashreplace'), encoding) | |
./doctest.py: return str(s.encode('ASCII', 'backslashreplace'), "ASCII") | |
./urllib/request.py: creds = base64.b64encode(user_pass.encode()).decode("ascii") | |
./urllib/request.py: auth = "Basic " + base64.b64encode(raw.encode()).decode("ascii") | |
./urllib/request.py: b = s.encode("ascii") + _randombytes(8) | |
./urllib/request.py: H = lambda x: hashlib.md5(x.encode("ascii")).hexdigest() | |
./urllib/request.py: H = lambda x: hashlib.sha1(x.encode("ascii")).hexdigest() | |
./urllib/request.py: proxy_auth = base64.b64encode(proxy_passwd.encode()).decode('ascii') | |
./urllib/request.py: auth = base64.b64encode(user_passwd.encode()).decode('ascii') | |
./urllib/request.py: data = base64.decodebytes(data.encode('ascii')).decode('latin-1') | |
./urllib/robotparser.py: self.parse(raw.decode("utf-8").splitlines()) | |
./urllib/parse.py: return obj.encode(encoding, errors) | |
./urllib/parse.py: return tuple(x.decode(encoding, errors) if x else '' for x in args) | |
./urllib/parse.py: return self._encoded_counterpart(*(x.encode(encoding, errors) for x in self)) | |
./urllib/parse.py: return self._decoded_counterpart(*(x.decode(encoding, errors) for x in self)) | |
./urllib/parse.py: string = string.encode('utf-8') | |
./urllib/parse.py: _hextobyte = {(a + b).encode(): bytes([int(a + b, 16)]) | |
./urllib/parse.py: sequences into Unicode characters, as accepted by the bytes.decode() | |
./urllib/parse.py: append(unquote_to_bytes(bits[i]).decode(encoding, errors)) | |
./urllib/parse.py: into Unicode characters, as accepted by the bytes.decode() method. | |
./urllib/parse.py: into Unicode characters, as accepted by the bytes.decode() method. | |
./urllib/parse.py: string = string.encode(encoding, errors) | |
./urllib/parse.py: safe = safe.encode('ascii', 'ignore') | |
./urllib/parse.py: return bs.decode() | |
./urllib/parse.py: url = url.encode("ASCII").decode() | |
./codecs.py: The .encode()/.decode() methods may use different error | |
./codecs.py: data, consumed = self.encode(object, self.errors) | |
./codecs.py: newchars, decodedbytes = self.decode(data, self.errors) | |
./codecs.py: self.decode(data[:exc.start], self.errors) | |
./codecs.py: data, bytesencoded = self.encode(data, self.errors) | |
./codecs.py: data, bytesencoded = self.encode(data, self.errors) | |
./codecs.py: data, bytesencoded = self.encode(data, self.errors) | |
./codecs.py: data, bytesencoded = self.encode(data, self.errors) | |
./codecs.py: data, bytesdecoded = self.decode(data, self.errors) | |
./codecs.py: data, bytesdecoded = self.decode(data, self.errors) | |
./codecs.py: output = encoder.encode(input) | |
./codecs.py: output = encoder.encode("", True) | |
./codecs.py: output = decoder.decode(input) | |
./codecs.py: output = decoder.decode(b"", True) | |
./compileall.py: msg = err.msg.encode(sys.stdout.encoding, | |
./compileall.py: msg = msg.decode(sys.stdout.encoding) | |
./pydoc.py: return text.encode(encoding, 'backslashreplace').decode(encoding) | |
./pydoc.py: self.path, content_type).encode('utf-8')) | |
./tarfile.py: s = s.encode(encoding, errors) | |
./tarfile.py: return s.decode(encoding, errors) | |
./tarfile.py: s = s.encode(encoding, 'backslashreplace').decode(encoding) | |
./tarfile.py: self.__write(self.name.encode("iso-8859-1", "replace") + NUL) | |
./tarfile.py: info[name].encode("ascii", "strict") | |
./tarfile.py: name = name.encode(encoding, errors) + NUL | |
./tarfile.py: value.encode("utf-8", "strict") | |
./tarfile.py: keyword = keyword.encode("utf-8") | |
./tarfile.py: value = value.encode(encoding, "surrogateescape") | |
./tarfile.py: value = value.encode("utf-8") | |
./tarfile.py: pax_headers["hdrcharset"] = match.group(1).decode("utf-8") | |
./tarfile.py: return value.decode(encoding, "strict") | |
./tarfile.py: return value.decode(fallback_encoding, fallback_errors) | |
./_pyio.py: output = self.decoder.decode(input, final=final) | |
./_pyio.py: b = encoder.encode(s) | |
./_pyio.py: decoded_chars = self._decoder.decode(input_chunk, eof) | |
./_pyio.py: # Rationale: calling decoder.decode() has a large overhead | |
./_pyio.py: n = len(decoder.decode(next_input[:skip_bytes])) | |
./_pyio.py: chars_decoded += len(decoder.decode(next_input[i:i+1])) | |
./_pyio.py: chars_decoded += len(decoder.decode(b'', final=True)) | |
./_pyio.py: self._decoder.decode(input_chunk, need_eof)) | |
./_pyio.py: decoder.decode(self.buffer.read(), final=True)) | |
./_pyio.py: return decoder.decode(self.buffer.getvalue(), final=True) | |
./inspect.py: lines = [l.encode('ascii') for l in signature.split('\n')] | |
./random.py: a = a.encode() | |
./cgi.py: qs = fp.read(clength).decode(encoding) | |
./cgi.py: qs = qs.encode(locale.getpreferredencoding(), 'surrogateescape') | |
./cgi.py: self.innerboundary = pdict['boundary'].encode(self.encoding) | |
./cgi.py: qs = qs.decode(self.encoding, self.errors) | |
./cgi.py: parser.feed(hdr_text.decode(self.encoding, self.errors)) | |
./cgi.py: self.file.write(line.decode(self.encoding, self.errors)) | |
./idlelib/OutputWindow.py: s = s.decode(IOBinding.encoding, "replace") | |
./idlelib/IOBinding.py: lines = data.decode('iso-8859-1') | |
./idlelib/IOBinding.py: chars = bytes[3:].decode("utf-8") | |
./idlelib/IOBinding.py: chars = self.encode(text) | |
./idlelib/IOBinding.py: return BOM_UTF8 + chars.encode("utf-8") | |
./idlelib/IOBinding.py: return chars.encode('ascii') | |
./idlelib/IOBinding.py: return chars.encode(enc) | |
./idlelib/IOBinding.py: return BOM_UTF8 + chars.encode("utf-8") | |
./idlelib/rpc.py: bytes = text.encode(encoding, 'backslashreplace') | |
./idlelib/rpc.py: text = bytes.decode(encoding, 'strict') | |
./idlelib/EditorWindow.py: filename = filename.decode(self.filesystemencoding) | |
./idlelib/EditorWindow.py: filename = filename.decode(self.encoding) | |
./idlelib/EditorWindow.py: filename = filename.decode('iso8859-1') | |
./idlelib/PyShell.py: # source = source.encode(IOBinding.encoding) | |
./venv/__init__.py: data = data.decode('utf-8') | |
./plistlib.py: return binascii.a2b_base64(s.encode("utf-8")) | |
./plistlib.py: line = line.encode('utf-8') | |
./plistlib.py: prefix = bom + start.decode('ascii').encode(encoding) | |
./plistlib.py: result = self._fp.read(s).decode('ascii') | |
./plistlib.py: result = self._fp.read(s * 2).decode('utf-16be') | |
./plistlib.py: t = value.encode('ascii') | |
./plistlib.py: t = value.encode('utf-16be') | |
./binhex.py: d = bytes([nl]) + name.encode("latin-1") + b'\0' | |
./binhex.py: tp = tp.encode("latin-1") | |
./binhex.py: cr = cr.encode("latin-1") | |
./pickle.py: return PUT + repr(idx).encode("ascii") + b'\n' | |
./pickle.py: return GET + repr(i).encode("ascii") + b'\n' | |
./pickle.py: self.write(PERSID + str(pid).encode("ascii") + b'\n') | |
./pickle.py: self.write(LONG + repr(obj).encode("ascii") + b'L\n') | |
./pickle.py: self.write(FLOAT + repr(obj).encode("ascii") + b'\n') | |
./pickle.py: encoded = obj.encode('utf-8', 'surrogatepass') | |
./pickle.py: self.write(UNICODE + obj.encode('raw-unicode-escape') + | |
./pickle.py: pid = self.readline()[:-1].decode("ascii") | |
./pickle.py: return value.decode(self.encoding, self.errors) | |
./pickle.py: module = self.readline()[:-1].decode("ascii") | |
./pickle.py: name = self.readline()[:-1].decode("ascii") | |
./pickle.py: module = self.readline()[:-1].decode("utf-8") | |
./pickle.py: name = self.readline()[:-1].decode("utf-8") | |
./xmlrpc/client.py: value.decode(data) | |
./xmlrpc/client.py: out.write(encoded.decode('ascii')) | |
./xmlrpc/client.py: value.decode(data) | |
./xmlrpc/client.py: write(encoded.decode('ascii')) | |
./xmlrpc/client.py: value.encode(self) | |
./xmlrpc/client.py: data = data.decode(self._encoding) | |
./xmlrpc/client.py: value.decode(data.encode("ascii")) | |
./xmlrpc/client.py: value.decode(data) | |
./xmlrpc/client.py: data = data.decode(self._encoding) | |
./xmlrpc/client.py: methodname = methodname.encode(encoding) | |
./xmlrpc/client.py: auth = base64.encodebytes(auth).decode("utf-8") | |
./xmlrpc/client.py: allow_none=self.__allow_none).encode(self.__encoding) | |
./xmlrpc/server.py: return response.encode(self.encoding) | |
./xmlrpc/server.py: trace = str(trace.encode('ASCII', 'backslashreplace'), 'ASCII') | |
./xmlrpc/server.py: response = response.encode(self.encoding) | |
./xmlrpc/server.py: response = response.encode('utf-8') | |
./xmlrpc/server.py: response = self.server.generate_html_documentation().encode('utf-8') | |
./xmlrpc/server.py: response = self.generate_html_documentation().encode('utf-8') | |
./pickletools.py: data = codecs.escape_decode(data)[0].decode("ascii") | |
./pickletools.py: return data.decode("latin-1") | |
./pickletools.py: return data.decode("latin-1") | |
./pickletools.py: >>> enc = s.encode('utf-8') | |
./pickletools.py: >>> enc = s.encode('utf-8') | |
./pickletools.py: >>> enc = s.encode('utf-8') | |
./pickletools.py: picklecode = picklecode.decode("latin-1") | |
./pickletools.py: opcode = code2op.get(code.decode("latin-1")) | |
./lib2to3/pgen2/tokenize.py: line_string = line.decode('ascii') | |
./lib2to3/pytree.py: return str(self).encode("ascii") | |
./lib2to3/tests/test_main.py: output = out.getvalue().decode("ascii") | |
./ssl.py: return base64.decodebytes(d.encode('ASCII', 'strict')) | |
./zipfile.py: return self.filename.encode('ascii'), self.flag_bits | |
./zipfile.py: return self.filename.encode('utf-8'), self.flag_bits | 0x800 | |
./zipfile.py: filename = filename.decode('utf-8') | |
./zipfile.py: filename = filename.decode('cp437') | |
./zipfile.py: fname_str = fname.decode("utf-8") | |
./zipfile.py: fname_str = fname.decode("cp437") | |
./zipfile.py: data = data.encode("utf-8") | |
./importlib/_bootstrap.py: return newline_decoder.decode(source_bytes.decode(encoding[0])) | |
./collections/__init__.py: return self.__class__(self.data.encode(encoding, errors)) | |
./collections/__init__.py: return self.__class__(self.data.encode(encoding)) | |
./collections/__init__.py: return self.__class__(self.data.encode()) | |
./platform.py: s.decode('latin1') if s is not None else s | |
./platform.py: output = proc.communicate()[0].decode('latin-1') | |
./tkinter/filedialog.py: print("open", openfilename.encode(enc)) | |
./tkinter/filedialog.py: print("saveas", saveasfilename.encode(enc)) | |
./tkinter/_fix.py: s = s.decode("mbcs") | |
./tkinter/test/test_tkinter/test_images.py: ('-data', '', '', '', data.decode('ascii'))) | |
./tkinter/test/test_tkinter/test_images.py: ('-maskdata', '', '', '', data.decode('ascii'))) | |
./tkinter/test/test_tkinter/test_images.py: else data.decode('latin1')) | |
./tkinter/test/test_tkinter/test_images.py: else data.decode('latin1')) | |
./encodings/punycode.py: text = text.encode("ascii") | |
./encodings/quopri_codec.py: quopri.encode(f, g, quotetabs=True) | |
./encodings/quopri_codec.py: quopri.decode(f, g) | |
./encodings/uu_codec.py: write(('begin %o %s\n' % (mode & 0o777, filename)).encode('ascii')) | |
./encodings/charmap.py: conversion mechanisms supplied by unicode() and .encode(). | |
./encodings/charmap.py: return Codec.encode(input,errors,self.mapping) | |
./encodings/charmap.py: return Codec.decode(input,errors,self.mapping) | |
./encodings/idna.py: label = label.encode("ascii") | |
./encodings/idna.py: label = label.encode("ascii") | |
./encodings/idna.py: label = label.encode("punycode") | |
./encodings/idna.py: label = label.encode("ascii") | |
./encodings/idna.py: label = label.encode("ascii") | |
./encodings/idna.py: result = label1.decode("punycode") | |
./encodings/idna.py: result = input.encode('ascii') | |
./encodings/idna.py: return input.decode('ascii'), len(input) | |
./encodings/rot_13.py: outfile.write(codecs.encode(infile.read(), 'rot-13')) | |
./nntplib.py: parts.append(v.decode(enc or 'ascii')) | |
./nntplib.py: line = line.encode(self.encoding, self.errors) | |
./nntplib.py: resp = resp.decode(self.encoding, self.errors) | |
./nntplib.py: return resp, [line.decode(self.encoding, self.errors) | |
./shelve.py: yield k.decode(self.keyencoding) | |
./shelve.py: return key.encode(self.keyencoding) in self.dict | |
./shelve.py: if key.encode(self.keyencoding) in self.dict: | |
./shelve.py: f = BytesIO(self.dict[key.encode(self.keyencoding)]) | |
./shelve.py: self.dict[key.encode(self.keyencoding)] = f.getvalue() | |
./shelve.py: del self.dict[key.encode(self.keyencoding)] | |
./shelve.py: return (key.decode(self.keyencoding), Unpickler(f).load()) | |
./shelve.py: return (key.decode(self.keyencoding), Unpickler(f).load()) | |
./shelve.py: return (key.decode(self.keyencoding), Unpickler(f).load()) | |
./shelve.py: return (key.decode(self.keyencoding), Unpickler(f).load()) | |
./shelve.py: return (key.decode(self.keyencoding), Unpickler(f).load()) | |
./sqlite3/dbapi2.py: microseconds = int('{:0<6.6}'.format(timepart_full[1].decode())) | |
./sqlite3/test/types.py: _val = _val.decode('utf-8') | |
./sqlite3/test/types.py: sqlite.converters["FOO"] = lambda x: "[%s]" % x.decode("ascii") | |
./sqlite3/test/types.py: sqlite.converters["BAR"] = lambda x: "<%s>" % x.decode("ascii") | |
./sqlite3/test/factory.py: self.assertEqual(row[0], austria.encode("utf-8"), "column must equal original data in UTF-8") | |
./uuid.py: dirs.insert(0, buffer.value.decode('mbcs')) | |
./distutils/log.py: msg = msg.encode(encoding, "backslashreplace").decode(encoding) | |
./distutils/command/upload.py: user_pass = (self.username + ":" + self.password).encode('ascii') | |
./distutils/command/upload.py: auth = "Basic " + standard_b64encode(user_pass).decode('ascii') | |
./distutils/command/upload.py: sep_boundary = b'\r\n--' + boundary.encode('ascii') | |
./distutils/command/upload.py: value = str(value).encode('utf-8') | |
./distutils/command/upload.py: body.write(title.encode('utf-8')) | |
./distutils/command/build_scripts.py: shebang.decode('utf-8') | |
./distutils/command/build_scripts.py: shebang.decode(encoding) | |
./distutils/command/bdist_wininst.py: cfgdata = cfgdata.encode("mbcs") | |
./distutils/command/bdist_wininst.py: script_data = script.read().encode("latin-1") | |
./distutils/command/register.py: body = body.getvalue().encode("utf-8") | |
./distutils/tests/test_bdist_rpm.py: sys.executable.encode("UTF-8") | |
./distutils/tests/test_archive_util.py: filename.encode(sys.getfilesystemencoding()) | |
./distutils/cygwinccompiler.py: return LooseVersion(result.group(1).decode()) | |
./distutils/config.py: return response.read().decode(encoding) | |
./distutils/msvc9compiler.py: raise DistutilsPlatformError(stderr.decode("mbcs")) | |
./distutils/msvc9compiler.py: stdout = stdout.decode("mbcs") | |
./json/encoder.py: >>> JSONEncoder().encode({"foo": ["bar", "baz"]}) | |
./json/__init__.py: >>> json.JSONEncoder(default=encode_complex).encode(2 + 1j) | |
./json/__init__.py: return _default_encoder.encode(obj) | |
./json/__init__.py: **kw).encode(obj) | |
./json/__init__.py: return _default_decoder.decode(s) | |
./json/__init__.py: return cls(**kw).decode(s) | |
./tokenize.py: out = out.encode(ut.encoding) | |
./tokenize.py: line_string = line.decode('utf-8') | |
./tokenize.py: line = line.decode(encoding) | |
./ftplib.py: self.sock.sendall(line.encode(self.encoding)) | |
./logging/handlers.py: prio = prio.encode('utf-8') | |
./logging/handlers.py: msg = msg.encode('utf-8') | |
./logging/handlers.py: s = ('u%s:%s' % self.credentials).encode('utf-8') | |
./logging/handlers.py: h.send(data.encode('utf-8')) | |
./logging/config.py: chunk = chunk.decode("utf-8") | |
./email/feedparser.py: super().feed(data.decode('ascii', 'surrogateescape')) | |
./email/mime/text.py: _text.encode('us-ascii') | |
./email/charset.py: return string.encode('ascii', 'surrogateescape') | |
./email/charset.py: return string.encode(codec) | |
./email/charset.py: input_charset.encode('ascii') | |
./email/charset.py: string = string.encode(self.output_charset) | |
./email/charset.py: string = string.encode(self.output_charset) | |
./email/charset.py: string = string.decode('latin1') | |
./email/charset.py: string = string.encode(self.output_charset).decode('ascii') | |
./email/base64mime.py: header_bytes = header_bytes.encode(charset) | |
./email/base64mime.py: encoded = b64encode(header_bytes).decode("ascii") | |
./email/base64mime.py: enc = b2a_base64(s[i:i + max_unencoded]).decode("ascii") | |
./email/base64mime.py: return a2b_base64(string.encode('raw-unicode-escape')) | |
./email/message.py: value.encode('ascii') | |
./email/message.py: bpayload = payload.encode('ascii', 'surrogateescape') | |
./email/message.py: payload = bpayload.decode(self.get_param('charset', 'ascii'), 'replace') | |
./email/message.py: payload = bpayload.decode('ascii', 'replace') | |
./email/message.py: bpayload = payload.encode('ascii') | |
./email/message.py: bpayload = payload.encode('raw-unicode-escape') | |
./email/message.py: uu.decode(in_file, out_file, quiet=True) | |
./email/message.py: payload = payload.encode(charset.output_charset) | |
./email/message.py: self._payload = payload.decode('ascii', 'surrogateescape') | |
./email/message.py: payload = payload.encode('ascii', 'surrogateescape') | |
./email/message.py: payload = payload.encode(charset.output_charset) | |
./email/message.py: as_bytes = charset[2].encode('raw-unicode-escape') | |
./email/message.py: charset.encode('us-ascii') | |
./email/_encoded_words.py: safe = b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii') | |
./email/_encoded_words.py: return base64.b64encode(bstring).decode('ascii') | |
./email/_encoded_words.py: bstring = cte_string.encode('ascii', 'surrogateescape') | |
./email/_encoded_words.py: string = bstring.decode(charset) | |
./email/_encoded_words.py: string = bstring.decode(charset, 'surrogateescape') | |
./email/_encoded_words.py: string = bstring.decode('ascii', 'surrogateescape') | |
./email/_encoded_words.py: bstring = string.encode('ascii', 'surrogateescape') | |
./email/_encoded_words.py: bstring = string.encode(charset) | |
./email/parser.py: text = text.decode('ASCII', errors='surrogateescape') | |
./email/utils.py: s.encode() | |
./email/utils.py: original_bytes = string.encode('utf-8', 'surrogateescape') | |
./email/utils.py: return original_bytes.decode('utf-8', 'replace') | |
./email/utils.py: address.encode('ascii') | |
./email/utils.py: name.encode('ascii') | |
./email/policy.py: return folded.encode('ascii', 'surrogateescape') | |
./email/header.py: word = email.base64mime.decode(encoded_string) | |
./email/header.py: original_bytes = string.encode('ascii', 'surrogateescape') | |
./email/header.py: string = original_bytes.decode('ascii', 'replace') | |
./email/header.py: s = s.decode('us-ascii', 'surrogateescape') | |
./email/header.py: s = s.decode(input_charset, errors) | |
./email/header.py: s.encode(output_charset, errors) | |
./email/generator.py: self._fp.write(s.encode('ascii', 'surrogateescape')) | |
./email/generator.py: return s.encode('ascii') | |
./email/generator.py: return re.compile(s.encode('ascii'), flags) | |
./email/_policybase.py: return folded.encode('ascii', 'surrogateescape') | |
./email/_policybase.py: parts.append(h.encode(linesep=self.linesep, | |
./email/quoprimime.py:for c in b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii'): | |
./email/quoprimime.py: encoded = header_bytes.decode('latin1').translate(_QUOPRI_HEADER_MAP) | |
./email/quoprimime.py:# the same as base64MIME.decode() or not... | |
./email/contentmanager.py: return content.decode(charset, errors=errors) | |
./email/contentmanager.py: encoded_lines.append(binascii.b2a_base64(thisline).decode('ascii')) | |
./email/contentmanager.py: lines = string.encode(charset).splitlines() | |
./email/contentmanager.py: linesep = policy.linesep.encode('ascii') | |
./email/contentmanager.py: return '7bit', normal_body(lines).decode('ascii') | |
./email/contentmanager.py: return '8bit', normal_body(lines).decode('ascii', 'surrogateescape') | |
./email/contentmanager.py: sniff_qp = quoprimime.body_encode(sniff.decode('latin-1'), | |
./email/contentmanager.py: data = normal_body(lines).decode('ascii') | |
./email/contentmanager.py: data = normal_body(lines).decode('ascii', 'surrogateescape') | |
./email/contentmanager.py: data = quoprimime.body_encode(normal_body(lines).decode('latin-1'), | |
./email/contentmanager.py: data = data.decode('ascii') | |
./email/contentmanager.py: data.encode('ascii') | |
./email/contentmanager.py: data = data.decode('ascii', 'surrogateescape') | |
./email/encoders.py: orig.decode('ascii') | |
./email/_header_value_parser.py: res.append(_ew.encode(str(self), charset)) | |
./email/_header_value_parser.py: str(part).encode('us-ascii') | |
./email/_header_value_parser.py: str(part).encode('us-ascii') | |
./email/_header_value_parser.py: spart.encode('us-ascii') | |
./email/_header_value_parser.py: str(part).encode('us-ascii') | |
./email/_header_value_parser.py: spart.encode('us-ascii') | |
./email/_header_value_parser.py: _ew.encode(str(self), self.charset) | |
./email/_header_value_parser.py: value = value.decode(charset, 'surrogateescape') | |
./email/_header_value_parser.py: value = value.decode('us-ascii', 'surrogateescape') | |
./email/_header_value_parser.py: value.encode('us-ascii') | |
./email/_header_value_parser.py: return _ew.encode(value, charset) | |
./email/_header_value_parser.py: return _ew.encode(str(self), charset) | |
./email/_header_value_parser.py: text, charset, lang, defects = _ew.decode('=?' + tok + '?=') | |
./email/_header_value_parser.py: local_part.value.encode('ascii') | |
./test/test_nntplib.py: lit = lit.encode('utf-8') | |
./test/test_nntplib.py: self.assertEqual(lines[-1].decode('utf-8'), "-- Signed by André.") | |
./test/test_binascii.py: a = a.decode('ascii') | |
./test/test_importlib/test_abc.py: expected_source = self.loader.source.decode('utf-8') | |
./test/test_importlib/test_abc.py: self.loader.source = source.encode('utf-8') | |
./test/test_importlib/test_abc.py: self.loader.source = source.encode('latin-1') | |
./test/test_importlib/test_abc.py: mock.source = source.encode('utf-8') | |
./test/test_importlib/test_abc.py: assert source.encode('latin-1') != source.encode('utf-8') | |
./test/test_importlib/test_abc.py: mock.source = source.encode('latin-1') | |
./test/test_importlib/test_abc.py: mock.source = source.encode('utf-8') | |
./test/test_importlib/test_abc.py: expect = io.IncrementalNewlineDecoder(None, True).decode(source) | |
./test/test_importlib/test_util.py: source_bytes = self.source.encode('utf-8') | |
./test/test_importlib/test_util.py: source_bytes = source.encode('latin-1') | |
./test/test_importlib/test_util.py: assert source_bytes != source.encode('utf-8') | |
./test/test_importlib/test_util.py: source_bytes = source.encode('utf-8') | |
./test/test_importlib/source/test_source_encoding.py: source_lines = [encoding_line.encode('utf-8')] | |
./test/test_importlib/source/test_source_encoding.py: source_lines.append(self.source_line.encode(encoding)) | |
./test/test_importlib/source/test_source_encoding.py: source = "{0}\na=42\n".format(encoding_line).encode("koi8-r") | |
./test/test_importlib/source/test_source_encoding.py: self.run_test(self.source_line.encode('utf-8')) | |
./test/test_importlib/source/test_source_encoding.py: self.run_test(codecs.BOM_UTF8 + self.source_line.encode('utf-8')) | |
./test/test_cmd_line_script.py: self.assertIn(printed_loader.encode('utf-8'), data) | |
./test/test_cmd_line_script.py: self.assertIn(printed_file.encode('utf-8'), data) | |
./test/test_cmd_line_script.py: self.assertIn(printed_package.encode('utf-8'), data) | |
./test/test_cmd_line_script.py: self.assertIn(printed_argv0.encode('utf-8'), data) | |
./test/test_cmd_line_script.py: self.assertIn(printed_path0.encode('utf-8'), data) | |
./test/test_cmd_line_script.py: self.assertIn(printed_cwd.encode('utf-8'), data) | |
./test/test_cmd_line_script.py: self.assertIn(expected_msg.encode('utf-8'), err) | |
./test/test_cmd_line_script.py: expected = repr(importlib.machinery.BuiltinImporter).encode("utf-8") | |
./test/test_cmd_line_script.py: expected = repr(importlib.machinery.BuiltinImporter).encode("utf-8") | |
./test/test_cmd_line_script.py: self.assertIn(expected.encode('utf-8'), out) | |
./test/test_cmd_line_script.py: self.assertIn(expected.encode('utf-8'), out) | |
./test/test_cmd_line_script.py: text = stderr.decode('ascii').split('\n') | |
./test/test_cmd_line_script.py: stdout.rstrip().decode('ascii'), | |
./test/test_cmd_line_script.py: text = stderr.decode('ascii') | |
./test/test_re.py: alnum_chars = (string.ascii_letters + string.digits + '_').encode('ascii') | |
./test/test_re.py: b = 'y\u2620y\u2620y'.encode('utf-8') | |
./test/test_re.py: res = re.findall(re.escape('\u2620'.encode('utf-8')), b) | |
./test/test_re.py: self.assertTrue(re.match((r"\%03o" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"\%03o0" % i).encode(), bytes([i])+b"0")) | |
./test/test_re.py: self.assertTrue(re.match((r"\%03o8" % i).encode(), bytes([i])+b"8")) | |
./test/test_re.py: self.assertTrue(re.match((r"\x%02x" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"\x%02x0" % i).encode(), bytes([i])+b"0")) | |
./test/test_re.py: self.assertTrue(re.match((r"\x%02xz" % i).encode(), bytes([i])+b"z")) | |
./test/test_re.py: self.assertTrue(re.match((r"[\%o]" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"[\%o8]" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"[\%03o]" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"[\%03o0]" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"[\%03o8]" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"[\x%02x]" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"[\x%02x0]" % i).encode(), bytes([i]))) | |
./test/test_re.py: self.assertTrue(re.match((r"[\x%02xz]" % i).encode(), bytes([i]))) | |
./test/test_re.py: pattern = pattern.encode() | |
./test/test_charmapcodec.py: self.assertEqual('abc'.encode(codecname), b'abc') | |
./test/test_charmapcodec.py: self.assertEqual('xdef'.encode(codecname), b'abcdef') | |
./test/test_charmapcodec.py: self.assertEqual('defx'.encode(codecname), b'defabc') | |
./test/test_charmapcodec.py: self.assertEqual('dxf'.encode(codecname), b'dabcf') | |
./test/test_charmapcodec.py: self.assertEqual('dxfx'.encode(codecname), b'dabcfabc') | |
./test/test_pep277.py: name.encode(fsencoding) | |
./test/test_pep277.py: f.write((name+'\n').encode("utf-8")) | |
./test/test_pep277.py: f.write((name+'\n').encode("utf-8")) | |
./test/test_pep277.py: f1 = os.listdir(support.TESTFN.encode(sys.getfilesystemencoding())) | |
./test/test_pep277.py: f.write((filename + '\n').encode("utf-8")) | |
./test/test_docxmlrpc.py: return x.decode() | |
./test/test_bigmem.py: self.assertEqual(len(s.encode(enc)), expectedsize) | |
./test/test_bigmem.py: return s.encode("latin-1") | |
./test/test_bigmem.py: self.assertEqual(len(s.decode('utf-8')), size) | |
./test/test_bigmem.py: return bytearray(s.encode("latin-1")) | |
./test/test_bigmem.py: self.assertEqual(len(s.decode('utf-8')), size) | |
./test/test_warnings.py: "['ignore:DeprecaciónWarning']".encode('utf-8')) | |
./test/test_pdb.py: stdout, stderr = proc.communicate(str.encode(commands)) | |
./test/test_pdb.py: stdout = stdout and bytes.decode(stdout) | |
./test/test_pdb.py: stderr = stderr and bytes.decode(stderr) | |
./test/test_pdb.py: t.start()""").encode('ascii')) | |
./test/test_pdb.py: self.assertNotIn('Error', stdout.decode(), | |
./test/test_smtpd.py: '250 {}\r\n'.format(name).encode('ascii')) | |
./test/test_weakref.py: out = out.decode('ascii').splitlines() | |
./test/test_imghdr.py: data = stream.read().decode('latin1') | |
./test/test_imp.py: decoded_char = special_char.decode(fs_encoding) | |
./test/test_imaplib.py: self._send_line(message.encode('ASCII')) | |
./test/test_imaplib.py: splitline = line.decode('ASCII').split() | |
./test/test_shutil.py: details = exc.output.decode(errors="replace") | |
./test/test_shutil.py: size = subprocess.check_output(['stty', 'size']).decode().split() | |
./test/ssl_servers.py: body = body.encode('utf-8') | |
./test/test_traceback.py: stdout = stdout.decode(output_encoding).splitlines() | |
./test/test_traceback.py: encoded_message = message.encode(output_encoding, | |
./test/test_traceback.py: message_ascii = encoded_message.decode(output_encoding) | |
./test/test_univnewlines.py: data = data.encode("ascii") | |
./test/test_codeccallbacks.py: s.encode("ascii", "xmlcharrefreplace"), | |
./test/test_codeccallbacks.py: s.encode("latin-1", "xmlcharrefreplace"), | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("ascii", "test.xmlcharnamereplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("latin-1", "test.xmlcharnamereplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("iso-8859-15", "test.xmlcharnamereplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("ascii", "test.uninamereplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("latin-1", "test.uninamereplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("iso-8859-15", "test.uninamereplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("ascii", "backslashreplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("latin-1", "backslashreplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.encode("iso-8859-15", "backslashreplace"), sout) | |
./test/test_codeccallbacks.py: self.assertEqual(sin.decode("utf-8", "test.relaxedutf8"), sout) | |
./test/test_codeccallbacks.py: if len('\0'.encode('unicode-internal')) == 4: | |
./test/test_codeccallbacks.py: b"\x00\x00\x00\x00\x00".decode("unicode-internal", "ignore"), | |
./test/test_codeccallbacks.py: b"\x00\x00\x00\x00\x00".decode("unicode-internal", "replace"), | |
./test/test_codeccallbacks.py: b"\x00\x00\x00\x00\x00".decode("unicode-internal", "test.hui"), | |
./test/test_codeccallbacks.py: s.decode("ascii", "test.handler1"), | |
./test/test_codeccallbacks.py: s.decode("ascii", "test.handler2"), | |
./test/test_codeccallbacks.py: b"\\u3042\u3xxx".decode("unicode-escape", "test.handler1"), | |
./test/test_codeccallbacks.py: b"\\u3042\u3xx".decode("unicode-escape", "test.handler1"), | |
./test/test_codeccallbacks.py: "g\xfc\xdfrk".encode("ascii", "test.handler1"), | |
./test/test_codeccallbacks.py: "g\xfc\xdf".encode("ascii", "test.handler1"), | |
./test/test_codeccallbacks.py: uni.encode(enc, err) | |
./test/test_codeccallbacks.py: UnicodeDecodeError(enc, "a".encode(enc), 0, 1, "ouch") | |
./test/test_codeccallbacks.py: s.encode(enc, err) | |
./test/test_codeccallbacks.py: self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>0") | |
./test/test_codeccallbacks.py: self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?><?>") | |
./test/test_codeccallbacks.py: self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>0") | |
./test/test_codeccallbacks.py: self.assertEqual(b"\xff0".decode("ascii", "test.posreturn"), "<?>") | |
./test/test_codeccallbacks.py: self.assertEqual(b"\\uyyyy0".decode("raw-unicode-escape", "test.posreturn"), "<?>0") | |
./test/test_codeccallbacks.py: self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>0") | |
./test/test_codeccallbacks.py: self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?><?>") | |
./test/test_codeccallbacks.py: self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>0") | |
./test/test_codeccallbacks.py: self.assertEqual("\xff0".encode("ascii", "test.posreturn"), b"<?>") | |
./test/test_codeccallbacks.py: data.decode(encoding, "test.replacing") | |
./test/test_codeccallbacks.py: data.decode(encoding, "test.replacing") | |
./test/test_unicode_file.py: TESTFN_UNICODE.encode(TESTFN_ENCODING) | |
./test/test_shelve.py: return s.decode("latin-1") | |
./test/test_shelve.py: yield k.encode("latin-1") | |
./test/test_shelve.py: self.assertIn(key.encode('utf-8'), d) | |
./test/test_shelve.py: self.assertIn(key.encode('latin-1'), d) | |
./test/test_shelve.py: encodedkey = key.encode('utf-8') | |
./test/test_sax.py: TEST_XMLFILE.encode("utf-8") | |
./test/test_sax.py: TEST_XMLFILE_OUT.encode("utf-8") | |
./test/test_sax.py: support.TESTFN_UNICODE.encode(support.TESTFN_ENCODING) | |
./test/test_sax.py: return xml_str(doc, decl_encoding).encode(encoding, 'xmlcharrefreplace') | |
./test/test_sax.py: gen.characters("\u20ac".encode(encoding)) | |
./test/test_sax.py: gen.ignorableWhitespace(" ".encode(encoding)) | |
./test/test_sax.py: (encoding, doc)).encode(encoding, 'xmlcharrefreplace') | |
./test/test_sax.py: (encoding, doc)).encode('ascii', 'xmlcharrefreplace') | |
./test/test_sax.py: (encoding, doc)).encode('ascii', 'xmlcharrefreplace') | |
./test/test_sysconfig.py: test_platform = test_platform.decode('utf-8') | |
./test/test_sysconfig.py: test_platform = test_platform.decode('utf-8') | |
./test/test_minidom.py: '<foo>\u20ac</foo>'.encode('utf-16')) | |
./test/test_file.py: f.write(str(s).encode("ascii")) | |
./test/test_file.py: d = int(f.read().decode("ascii")) | |
./test/test_decimal.py: 'decimal_point' : b'\xc2\xbf'.decode('utf-8'), | |
./test/test_decimal.py: 'thousands_sep' : b'\xc2\xb4'.decode('utf-8') | |
./test/test_zipfile.py: content = zipf2.read("foo%08d" % i).decode('ascii') | |
./test/test_zipfile.py: content = zipf2.read("foo%08d" % i).decode('ascii') | |
./test/test_zipfile.py: self.assertEqual(fdata.encode(), f.read()) | |
./test/test_zipfile.py: self.assertEqual(fdata.encode(), f.read()) | |
./test/test_zipfile.py: content = b'foobar' + arcname.encode() | |
./test/test_zipfile.py: comment2 = comment2.encode("ascii") | |
./test/test_sys.py: expected = ("\xa2" + os.linesep).encode("cp424") | |
./test/test_sys.py: 'import sys; print(sys.executable.encode("ascii", "backslashreplace"))'], | |
./test/test_sys.py: executable = stdout.strip().decode("ASCII") | |
./test/test_sys.py: self.assertIn(executable, ["b''", repr(sys.executable.encode("ascii", "backslashreplace"))]) | |
./test/test_site.py: 'os_file = os.__file__.encode("ascii", "backslashreplace")', | |
./test/test_site.py: 'os_cached = os.__cached__.encode("ascii", "backslashreplace")', | |
./test/test_site.py: stdout = stdout.decode('utf-8') | |
./test/test_site.py: stderr = stderr.decode('utf-8') | |
./test/test_urlparse.py: return (t[0].encode('ascii'), | |
./test/test_urlparse.py: tuple(x.encode('ascii') for x in t[1]), | |
./test/test_urlparse.py: tuple(x.encode('ascii') for x in t[2])) | |
./test/test_urlparse.py: return (t[0].encode('ascii'), | |
./test/test_urlparse.py: tuple(x.encode('ascii') for x in t[1]), | |
./test/test_urlparse.py: tuple(x.encode('ascii') for x in t[2])) | |
./test/test_urlparse.py: x.encode('ascii') for x in str_components] | |
./test/test_urlparse.py: bytes_cases = [x.encode('ascii') for x in str_cases] | |
./test/test_urlparse.py: return t[0].encode('ascii'), t[1].encode('ascii'), t[2] | |
./test/test_urlparse.py: bytes_cases = [x.encode('ascii') for x in str_cases] | |
./test/test_urlparse.py: return type(t)(x.encode('ascii') for x in t) | |
./test/test_urlparse.py: self.assertEqual(bytes_result.decode(), str_args) | |
./test/test_urlparse.py: self.assertEqual(bytes_result.decode(), str_result) | |
./test/test_urlparse.py: self.assertEqual(bytes_result.decode(encoding), str_args) | |
./test/test_urlparse.py: self.assertEqual(bytes_result.decode(encoding), str_result) | |
./test/test_urlparse.py: self.assertEqual(bytes_result.decode(encoding, errors), str_args) | |
./test/test_urlparse.py: self.assertEqual(bytes_result.decode(encoding, errors), str_result) | |
./test/test_urlparse.py: self.assertEqual(str_result.encode(), bytes_args) | |
./test/test_urlparse.py: self.assertEqual(str_result.encode(), bytes_result) | |
./test/test_urlparse.py: self.assertEqual(str_result.encode(encoding), bytes_args) | |
./test/test_urlparse.py: self.assertEqual(str_result.encode(encoding), bytes_result) | |
./test/test_urlparse.py: self.assertEqual(str_result.encode(encoding, errors), bytes_args) | |
./test/test_urlparse.py: self.assertEqual(str_result.encode(encoding, errors), bytes_result) | |
./test/test_urllib.py: b64encode(userpass.encode("ASCII")).decode("ASCII")) | |
./test/test_urllib.py: self.assertIn(authorization, fakehttp_wrapper.buf.decode("UTF-8")) | |
./test/test_urllib.py: self.assertEqual(self.text_url_resp.read().decode( | |
./test/test_urllib.py: self.assertEqual(self.text_url_base64_resp.read().decode( | |
./test/test_urllib.py: filePath.encode("utf-8") | |
./test/test_pyexpat.py: parser.Parse(data.decode('iso-8859-1'), 1) | |
./test/test_pyexpat.py: self.assertRaises(Exception, parser.Parse, xml.encode('iso8859')) | |
./test/test_descr.py: return binascii.b2a_hex(self.encode('ascii')).decode("ascii") | |
./test/test_ntpath.py: fn = os.fsencode(fn).decode('latin1') | |
./test/test_ntpath.py: fn = fn.encode('ascii', 'backslashreplace').decode('ascii') | |
./test/test_capi.py: return out.decode("latin1"), err.decode("latin1") | |
./test/test_capi.py: format.encode("ascii"), keywords) | |
./test/test_capi.py: optional_format.encode("ascii"), keywords) | |
./test/test_urllib2.py: path.encode("utf-8") | |
./test/test_urllib2.py: base64.encodebytes(userpass).strip().decode()) | |
./test/test_urllib2.py: conn = test_urllib.fakehttp(header.encode() + data) | |
./test/test_urllib2.py: opener.open(request, "1".encode("us-ascii")) | |
./test/test_urllib2.py: opener.open(request, "1234567890".encode("us-ascii")) | |
./test/test_cmd_line.py: version = ('Python %d.%d' % sys.version_info[:2]).encode("ascii") | |
./test/test_cmd_line.py: decoded = text.decode('utf-8', 'surrogateescape') | |
./test/test_cmd_line.py: expected = ascii(decoded).encode('ascii') + b'\n' | |
./test/test_cmd_line.py: text = 'e:\xe9, euro:\u20ac, non-bmp:\U0010ffff'.encode('utf-8') | |
./test/test_cmd_line.py: path = path.encode("ascii", "backslashreplace") | |
./test/test_cmd_line.py: self.assertIn(path1.encode('ascii'), out) | |
./test/test_cmd_line.py: self.assertIn(path2.encode('ascii'), out) | |
./test/test_cmd_line.py: path = path.encode("ascii", "backslashreplace") | |
./test/test_cmd_line.py: p.stdin.write(ascii(text).encode('ascii') + b"\n") | |
./test/test_cmd_line.py: escaped = repr(text).encode(encoding, 'backslashreplace') | |
./test/test_cmd_line.py: sep = os.linesep.encode('ASCII') | |
./test/test_cmd_line.py: self.assertRegex(err.decode('ascii', 'ignore'), 'SyntaxError') | |
./test/test_cmd_line.py: self.assertRegex(err.decode('ascii', 'ignore'), | |
./test/test_inspect.py: lines = out.decode().splitlines() | |
./test/test_inspect.py: lines = out.decode().splitlines() | |
./test/test_inspect.py: lines = err.decode().splitlines() | |
./test/test_inspect.py: output = out.decode() | |
./test/test_multiprocessing_main_handling.py: self.assertEqual(err.decode('utf-8'), '') | |
./test/test_multiprocessing_main_handling.py: self.assertEqual(out.decode('utf-8').strip(), expected_results) | |
./test/test_float.py: lambda b: CustomStr(b.decode()), | |
./test/test_threading.py: data = out.decode().replace('\r', '') | |
./test/test_threading.py: data = out.decode().replace('\r', '') | |
./test/test_threading.py: data = out.decode().replace('\r', '') | |
./test/test_threading.py: "not the last thread", err.decode()) | |
./test/test_threading.py: data = stdout.decode().replace('\r', '') | |
./test/test_threading.py: self.assertEqual(p.returncode, 0, "Unexpected error: " + stderr.decode()) | |
./test/test_threading.py: err = err.decode() | |
./test/test_threading.py: err = err.decode() | |
./test/test_threading.py: self.assertNotIn("Unhandled exception", err.decode()) | |
./test/test_dbm.py: f[k.encode("ascii")] = self._dict[k] | |
./test/test_dbm.py: keys = sorted(k.decode("ascii") for k in f.keys()) | |
./test/test_dbm.py: f[key.encode("ascii")] = self._dict[key] | |
./test/test_dbm.py: key = "a".encode("ascii") | |
./test/test_dbm.py: self.assertEqual(self._dict[key], f[key.encode("ascii")]) | |
./test/test_lzma.py: bytes_filename = TESTFN.encode("ascii") | |
./test/test_lzma.py: bytes_filename = TESTFN.encode("ascii") | |
./test/test_lzma.py: uncompressed = INPUT.decode("ascii") | |
./test/test_lzma.py: file_data = lzma.decompress(bio.getvalue()).decode("ascii") | |
./test/test_lzma.py: file_data = lzma.decompress(bio.getvalue()).decode("ascii") | |
./test/test_lzma.py: uncompressed = INPUT.decode("ascii") | |
./test/test_lzma.py: file_data = lzma.decompress(bio.getvalue()).decode("utf-16-le") | |
./test/test_lzma.py: text = INPUT.decode("ascii") | |
./test/pickletester.py: if op.code == code.decode("latin-1"): | |
./test/pickletester.py: if op.code == code.decode("latin-1"): | |
./test/pickletester.py: xname = X.__name__.encode('ascii') | |
./test/pickletester.py: data = b'I' + str(maxint64).encode("ascii") + b'\n.' | |
./test/pickletester.py: data = b'I' + str(maxint64).encode("ascii") + b'JUNK\n.' | |
./test/pickletester.py: data = exception_pickle.replace(b'?', exc.__name__.encode("ascii")) | |
./test/pickletester.py: self.assertIn(__name__.encode("utf-8"), s1) | |
./test/pickletester.py: self.assertNotIn(__name__.encode("utf-8"), s2) | |
./test/pickletester.py: self.assertIn(('c%s\n%s' % (mod, name)).encode(), pickled) | |
./test/test_unicodedata.py: h.update(''.join(data).encode(encoding, errors)) | |
./test/test_unicodedata.py: h.update(''.join(data).encode("ascii")) | |
./test/test_unicodedata.py: self.assertIn(error, popen.stderr.read().decode("ascii")) | |
./test/test_urllib2_localnet.py: nonce = hashlib.md5(str(self._request_num).encode("ascii")).hexdigest() | |
./test/test_urllib2_localnet.py: HA1 = hashlib.md5(HA1_str.encode("ascii")).hexdigest() | |
./test/test_urllib2_localnet.py: HA2 = hashlib.md5(HA2_str.encode("ascii")).hexdigest() | |
./test/test_urllib2_localnet.py: response = hashlib.md5(response_str.encode("ascii")).hexdigest() | |
./test/test_urllib2_localnet.py: ENCODED_AUTH = base64.b64encode(USER_PASSWD.encode('ascii')).decode('ascii') | |
./test/test_zipimport_support.py: self.assertIn(expected.encode('utf-8'), out) | |
./test/test_zipimport_support.py: self.assertIn(expected.encode('utf-8'), out) | |
./test/test_zipimport_support.py: self.assertIn(os.path.normcase(script_name.encode('utf-8')), data) | |
./test/test_zipimport_support.py: self.assertIn(os.path.normcase(run_name.encode('utf-8')), data) | |
./test/test_file_eintr.py: (why, stdout.decode(), stderr.decode())) | |
./test/script_helper.py: res.err.decode('ascii', 'ignore'))) | |
./test/test_keyword.py: self.assertRegex(stderr, b'(?ms)' + NONEXISTENT_FILE.encode()) | |
./test/test_keyword.py: self.assertRegex(stderr, b'(?ms)' + NONEXISTENT_FILE.encode()) | |
./test/test_socket.py:MSG = 'Michael Gilfix was here\u1234\r\n'.encode('utf-8') ## test unicode string and carriage return | |
./test/test_socket.py: os.write(fd, str(i).encode()) | |
./test/test_socket.py: self.assertEqual(os.read(fd, 1024), str(n).encode()) | |
./test/test_socket.py: msg = msg.decode() | |
./test/test_socket.py: expecting = expecting.decode('utf-8') | |
./test/test_socket.py: read_msg = MSG.decode('utf-8') | |
./test/test_socket.py: write_msg = MSG.decode('utf-8') | |
./test/test_socket.py: read_msg = MSG.decode('utf-8') | |
./test/test_socket.py: write_msg = MSG.decode('utf-8') | |
./test/test_socket.py: self.bind(self.sock, b.decode("ascii", "surrogateescape")) | |
./test/test_memoryio.py: return s.encode("ascii") | |
./test/test_argparse.py: text = text.decode('ascii') | |
./test/test_argparse.py: text = text.encode('ascii') | |
./test/test_dbm_dumb.py: '\u00fc'.encode('utf-8') : b'!', | |
./test/test_dbm_dumb.py: self.assertEqual(f['\u00fc'], self._dict['\u00fc'.encode('utf-8')]) | |
./test/test_dbm_dumb.py: self.assertEqual(f['\u00fc'.encode('utf-8')], | |
./test/test_dbm_dumb.py: self._dict['\u00fc'.encode('utf-8')]) | |
./test/test_dbm_dumb.py: expected = sorted((k.encode("latin-1"), v) for k, v in d.items()) | |
./test/test_uu.py: return self.buffer.getvalue().decode(self._encoding, self._errors) | |
./test/test_uu.py: uu.encode(inp, out, "t1") | |
./test/test_uu.py: uu.encode(inp, out, "t1", 0o644) | |
./test/test_uu.py: uu.decode(inp, out) | |
./test/test_uu.py: uu.decode(inp, out) | |
./test/test_uu.py: uu.decode(inp, out) | |
./test/test_uu.py: uu.decode(inp, out) | |
./test/test_uu.py: with self.subTest("uu.decode()"): | |
./test/test_uu.py: uu.decode(inp, out, quiet=True) | |
./test/test_uu.py: decoded = codecs.decode(encodedtext, "uu_codec") | |
./test/test_uu.py: sys.stdin = FakeIO(plaintext.decode("ascii")) | |
./test/test_uu.py: uu.encode("-", "-", "t1", 0o666) | |
./test/test_uu.py: encodedtextwrapped(0o666, "t1").decode("ascii")) | |
./test/test_uu.py: sys.stdin = FakeIO(encodedtextwrapped(0o666, "t1").decode("ascii")) | |
./test/test_uu.py: uu.decode("-", "-") | |
./test/test_uu.py: self.assertEqual(stdout.getvalue(), plaintext.decode("ascii")) | |
./test/test_uu.py: uu.encode(fin, fout, self.tmpin, mode=0o644) | |
./test/test_uu.py: uu.encode(self.tmpin, self.tmpout, self.tmpin, mode=0o644) | |
./test/test_uu.py: uu.decode(f) | |
./test/test_uu.py: uu.decode(self.tmpin) | |
./test/test_uu.py: uu.decode(f) | |
./test/test_plistlib.py: ("<plist><array>%s</array></plist>"%i).encode()) | |
./test/test_plistlib.py: ("<plist><dict>%s</dict></plist>"%i).encode()) | |
./test/test_plistlib.py: ("<plist><array><dict>%s</dict></array></plist>"%i).encode()) | |
./test/test_plistlib.py: data = bom + data.decode('utf-8').encode(encoding) | |
./test/test_struct.py: expected = expected.encode('ascii') | |
./test/test_multibytecodec.py: self.assertEqual(b''.decode(enc), '') | |
./test/test_multibytecodec.py: self.assertEqual(''.encode(enc), b'') | |
./test/test_multibytecodec.py: self.assertEqual('abcd'.encode(enc), b'abcd') | |
./test/test_multibytecodec.py: self.assertEqual(data.encode(enc, "test.ignore"), b'') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\ud30c\uc774\uc36c \ub9c8\uc744'), | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u2606\u223c\u2606', True), | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('', True), b'') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('', False), b'') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u00e6\u0300'), b'\xab\xc4') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u00e6'), b'') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u0300'), b'\xab\xc4') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u00e6', True), b'\xa9\xdc') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u0300'), b'\xab\xdc') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u00e6'), b'') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('', True), b'\xa9\xdc') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('', True), b'') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u00e6'), b'') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u0300\u00e6'), b'\xab\xc4') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u0300'), b'\xab\xdc') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\u00e6'), b'') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('', True), b'\xa9\xdc') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\xff'), b'\\xff') | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('\n'), b'\n') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'\xc6\xc4\xc0\xcc\xbd'), | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'\xe3 \xb8\xb6\xc0\xbb'), | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b''), '') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'\xc6\xc4\xc0'), '\ud30c') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'\xcc'), '\uc774') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'\xc6\xc4\xc0'), '\ud30c') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'\xcc'), '\uc774') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(ESC + b'('), '') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'B', True), '') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(ESC + b'$'), '') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'B@$'), '\u4e16') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'@$@'), '\u4e16') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'$', True), '\u4e16') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'@$'), '@$') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(ESC + b'$'), '') | |
./test/test_multibytecodec.py: self.assertEqual(decoder.decode(b'B@$'), '\u4e16') | |
./test/test_multibytecodec.py: self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni) | |
./test/test_multibytecodec.py: self.assertNotIn(b'\x0e', '\N{SOFT HYPHEN}'.encode('iso-2022-jp-2')) | |
./test/test_multibytecodec.py: e = '\u3406'.encode(encoding) | |
./test/test_multibytecodec.py: chr(x).encode('iso_2022_jp', 'ignore') | |
./test/test_multibytecodec.py: self.assertEqual(self.text.encode(self.encoding), self.expected_reset) | |
./test/test_multibytecodec.py: encoder.encode(char) | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('', final=True), self.reset) | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('', final=True), b'') | |
./test/test_multibytecodec.py: encoder.encode(char, index == last_index) | |
./test/test_multibytecodec.py: self.assertEqual(encoder.encode('', final=True), b'') | |
./test/test_compileall.py: p.stdin.write((f3+os.linesep).encode('ascii')) | |
./test/_test_multiprocessing.py: return s.encode('latin') | |
./test/_test_multiprocessing.py: msg = ('This connection uses family %s' % fam).encode('ascii') | |
./test/_test_multiprocessing.py: s.sendall(('%s\n' % i).encode('ascii')) | |
./test/_test_multiprocessing.py: expected = ''.join('%s\n' % i for i in range(10)).encode('ascii') | |
./test/_test_multiprocessing.py: child_flags, grandchild_flags = json.loads(data.decode('ascii')) | |
./test/_test_multiprocessing.py: os.write(%d, lock1._semlock.name.encode("ascii") + b"\\n") | |
./test/_test_multiprocessing.py: os.write(%d, lock2._semlock.name.encode("ascii") + b"\\n") | |
./test/_test_multiprocessing.py: name1 = f.readline().rstrip().decode('ascii') | |
./test/_test_multiprocessing.py: name2 = f.readline().rstrip().decode('ascii') | |
./test/_test_multiprocessing.py: err = p.stderr.read().decode('utf-8') | |
./test/test_int.py: lambda b: CustomStr(b.decode()), | |
./test/test_memoryview.py: self._check_contents(tp, b, s.encode("utf-8")) | |
./test/test_doctest.py: ... return '\n'.join(s.decode().splitlines()) | |
./test/test_tokenize.py: f = BytesIO(s.encode('utf-8')) | |
./test/test_tokenize.py: g = tokenize(BytesIO(s.encode('utf-8')).readline) # tokenize the string | |
./test/test_tokenize.py: return untokenize(result).decode('utf-8') | |
./test/test_tokenize.py: line = literal.encode('utf-8') | |
./test/test_tokenize.py: b"# coding: " + enc.encode("ascii") + b"\n", | |
./test/test_tokenize.py: b"# coding: " + enc.encode("ascii") + b"\n", | |
./test/test_tokenize.py: return str(counter).encode() | |
./test/test_tokenize.py: tokens = list(tokenize(BytesIO(opstr.encode('utf-8')).readline)) | |
./test/test_tokenize.py: code = f.encode('utf-8') | |
./test/test_tokenize.py: code = code.encode('utf-8') | |
./test/test_tokenize.py: return untokenize(tokenize(BytesIO(code).readline)).decode('utf-8') | |
./test/test_io.py: output = self.buffer.decode('ascii') | |
./test/test_io.py: self.assertEqual(d.decode(input, eof), output) | |
./test/test_io.py: self.assertEqual(d.decode(b'oiabcd'), '') | |
./test/test_io.py: self.assertEqual(d.decode(b'', 1), 'abcd.') | |
./test/test_io.py: self.normalized = b"AAA\nBBB\nCCC\nDDD\nEEE\n".decode("ascii") | |
./test/test_io.py: raw = self.BytesIO("hello".encode("utf-8")) | |
./test/test_io.py: # XXX: str.encode() should return bytes | |
./test/test_io.py: data = bytes(''.join(input_lines).encode(encoding)) | |
./test/test_io.py: (None, normalized.decode("ascii").splitlines(keepends=True)), | |
./test/test_io.py: ("", testdata.decode("ascii").splitlines(keepends=True)), | |
./test/test_io.py: prefix = bytes(u_prefix.encode("utf-8")) | |
./test/test_io.py: suffix = bytes(u_suffix.encode("utf-8")) | |
./test/test_io.py: self.assertEqual(buf.getvalue(), (data * 2).encode(encoding)) | |
./test/test_io.py: self.assertEqual(f.read(), 'aaa'.encode(charset)) | |
./test/test_io.py: self.assertEqual(f.read(), 'aaaxxx'.encode(charset)) | |
./test/test_io.py: self.assertEqual(f.read(), 'bbbzzz'.encode(charset)) | |
./test/test_io.py: self.assertEqual(f.read(), 'aaaxxx'.encode(charset)) | |
./test/test_io.py: text = data.decode('ascii') | |
./test/test_io.py: self.assertIn(self.shutdown_error, err.decode()) | |
./test/test_io.py: self.assertEqual("ok", out.decode().strip()) | |
./test/test_io.py: self.assertEqual("ok", out.decode().strip()) | |
./test/test_io.py: self.assertEqual(decoder.decode(b, **kwargs), s) | |
./test/test_io.py: self.assertEqual(decoder.decode(b, **kwargs), s) | |
./test/test_io.py: for b in encoder.encode(s): | |
./test/test_io.py: result.append(decoder.decode(bytes([b]))) | |
./test/test_io.py: result.append(decoder.decode(c)) | |
./test/test_io.py: input = encoder.encode(input) | |
./test/test_io.py: self.assertEqual(decoder.decode(input), "abc") | |
./test/test_io.py: self.assertEqual(dec.decode("\u0D00"), "\u0D00") | |
./test/test_io.py: self.assertEqual(dec.decode("\u0A00"), "\u0A00") | |
./test/test_io.py: err = res.err.decode() | |
./test/test_io.py: self.check_interrupted_read_retry(lambda x: x.decode('latin1'), | |
./test/test_tools/test_md5sum.py: self.assertIn(part.encode(), out) | |
./test/test_tools/test_md5sum.py: self.assertIn(parts[-1].encode(), out) | |
./test/test_tools/test_md5sum.py: self.assertNotIn(parts[-2].encode(), out) | |
./test/test_ftplib.py: self.baseclass.last_received_data += self.recv(1024).decode('ascii') | |
./test/test_ftplib.py: super(DummyDTPHandler, self).push(what.encode('ascii')) | |
./test/test_ftplib.py: line = b''.join(self.in_buffer).decode('ascii') | |
./test/test_ftplib.py: asynchat.async_chat.push(self, data.encode('ascii') + b'\r\n') | |
./test/test_ftplib.py: received.append(data.decode('ascii')) | |
./test/test_ftplib.py: received.append(data.decode('ascii')) | |
./test/test_ftplib.py: f = io.BytesIO(RETR_DATA.encode('ascii')) | |
./test/test_ftplib.py: f = io.BytesIO(RETR_DATA.replace('\r\n', '\n').encode('ascii')) | |
./test/test_ftplib.py: f = io.BytesIO(RETR_DATA.replace('\r\n', '\n').encode('ascii')) | |
./test/test_ftplib.py: received.append(data.decode('ascii')) | |
./test/test_json/test_decode.py: bom_json = "[1,2,3]".encode('utf-8-sig').decode('utf-8') | |
./test/test_json/test_decode.py: bom_in_str = '"{}"'.format(''.encode('utf-8-sig').decode('utf-8')) | |
./test/test_json/test_recursion.py: self.assertEqual(enc.encode(JSONTestObject), '"JSONTestObject"') | |
./test/test_json/test_recursion.py: enc.encode(JSONTestObject) | |
./test/test_json/test_recursion.py: EndlessJSONEncoder(check_circular=False).encode(5j) | |
./test/test_json/test_tool.py: out, err = proc.communicate(self.data.encode()) | |
./test/test_json/test_tool.py: self.assertEqual(out.splitlines(), self.expect.encode().splitlines()) | |
./test/test_json/test_tool.py: self.assertEqual(out.splitlines(), self.expect.encode().splitlines()) | |
./test/test_logging.py: d = parse_qs(self.post_data.decode('utf-8')) | |
./test/test_logging.py: text = text.encode("utf-8") | |
./test/test_logging.py: err = err.decode() | |
./test/test_logging.py: self.assertEqual(data.decode("ascii"), m1.msg + newline) | |
./test/test_logging.py: self.assertEqual(data.decode("ascii"), m1.msg + newline) | |
./test/test_logging.py: self.assertEqual(data.decode("ascii"), m2.msg + newline) | |
./test/test_tracemalloc.py: self.assertEqual(stdout, str(nframe).encode('ascii')) | |
./test/test_quopri.py: quopri.encode(infp, outfp, quotetabs=False) | |
./test/test_quopri.py: quopri.decode(infp, outfp) | |
./test/test_quopri.py: cout = cout.decode('latin-1').splitlines() | |
./test/test_quopri.py: e = e.decode('latin-1').splitlines() | |
./test/test_quopri.py: cout = cout.decode('latin-1') | |
./test/test_quopri.py: p = p.decode('latin-1') | |
./test/test_unicode.py: return text.encode().decode() | |
./test/test_unicode.py: self.assertEqual(subclass.encode('ascii'), b'ascii') | |
./test/test_unicode.py: self.assertEqual(subclass.encode('utf-8'), b'ascii') | |
./test/test_unicode.py: utf8_cent = '¢'.encode('utf-8') | |
./test/test_unicode.py: self.assertEqual(x.encode('utf-7'), y) | |
./test/test_unicode.py: self.assertEqual('\uD801'.encode('utf-7'), b'+2AE-') | |
./test/test_unicode.py: self.assertEqual('\uD801x'.encode('utf-7'), b'+2AE-x') | |
./test/test_unicode.py: self.assertEqual('\uDC01'.encode('utf-7'), b'+3AE-') | |
./test/test_unicode.py: self.assertEqual('\uDC01x'.encode('utf-7'), b'+3AE-x') | |
./test/test_unicode.py: self.assertEqual(b'+2AE-'.decode('utf-7'), '\uD801') | |
./test/test_unicode.py: self.assertEqual(b'+2AE-x'.decode('utf-7'), '\uD801x') | |
./test/test_unicode.py: self.assertEqual(b'+3AE-'.decode('utf-7'), '\uDC01') | |
./test/test_unicode.py: self.assertEqual(b'+3AE-x'.decode('utf-7'), '\uDC01x') | |
./test/test_unicode.py: self.assertEqual('\uD801\U000abcde'.encode('utf-7'), b'+2AHab9ze-') | |
./test/test_unicode.py: self.assertEqual(b'+2AHab9ze-'.decode('utf-7'), '\uD801\U000abcde') | |
./test/test_unicode.py: self.assertEqual(b'+\xc1'.decode('utf-7', 'ignore'), '') | |
./test/test_unicode.py: self.assertEqual(c.encode('utf7'), c.encode('ascii')) | |
./test/test_unicode.py: self.assertEqual(c.encode('ascii').decode('utf7'), c) | |
./test/test_unicode.py: self.assertEqual(c.encode('ascii').decode('utf7'), c) | |
./test/test_unicode.py: self.assertEqual(''.encode('utf-8'), b'') | |
./test/test_unicode.py: self.assertEqual('\u20ac'.encode('utf-8'), b'\xe2\x82\xac') | |
./test/test_unicode.py: self.assertEqual('\U00010002'.encode('utf-8'), b'\xf0\x90\x80\x82') | |
./test/test_unicode.py: self.assertEqual('\U00023456'.encode('utf-8'), b'\xf0\xa3\x91\x96') | |
./test/test_unicode.py: self.assertEqual('\ud800'.encode('utf-8', 'surrogatepass'), b'\xed\xa0\x80') | |
./test/test_unicode.py: self.assertEqual('\udc00'.encode('utf-8', 'surrogatepass'), b'\xed\xb0\x80') | |
./test/test_unicode.py: self.assertEqual(('\U00010002'*10).encode('utf-8'), | |
./test/test_unicode.py: ' Nunstuck git und'.encode('utf-8'), | |
./test/test_unicode.py: self.assertEqual(seq.decode('utf-8'), res) | |
./test/test_unicode.py: self.assertEqual(seq.decode('utf-8', 'replace'), res) | |
./test/test_unicode.py: self.assertEqual((seq+b'b').decode('utf-8', 'replace'), res+'b') | |
./test/test_unicode.py: self.assertEqual(seq.decode('utf-8', 'ignore'), | |
./test/test_unicode.py: seq.decode('utf-8') | |
./test/test_unicode.py: self.assertEqual(seq.decode('utf-8', 'replace'), res) | |
./test/test_unicode.py: self.assertEqual((b'aaaa' + seq + b'bbbb').decode('utf-8', 'replace'), | |
./test/test_unicode.py: self.assertEqual(seq.decode('utf-8', 'ignore'), res) | |
./test/test_unicode.py: self.assertEqual((b'aaaa' + seq + b'bbbb').decode('utf-8', 'ignore'), | |
./test/test_unicode.py: self.assertEqual("www.python.org.".encode("idna"), b"www.python.org.") | |
./test/test_unicode.py: self.assertEqual('Andr\202 x'.encode('ascii','ignore'), b"Andr x") | |
./test/test_unicode.py: self.assertEqual('Andr\202 x'.encode('ascii','replace'), b"Andr? x") | |
./test/test_unicode.py: self.assertEqual('Andr\202 x'.encode('ascii', 'replace'), | |
./test/test_unicode.py: 'Andr\202 x'.encode('ascii', errors='replace')) | |
./test/test_unicode.py: self.assertEqual('Andr\202 x'.encode('ascii', 'ignore'), | |
./test/test_unicode.py: 'Andr\202 x'.encode(encoding='ascii', errors='ignore')) | |
./test/test_unicode.py: self.assertEqual(b"\\N{foo}xx".decode("unicode-escape", "ignore"), "xx") | |
./test/test_unicode.py: self.assertEqual('hello'.encode('ascii'), b'hello') | |
./test/test_unicode.py: self.assertEqual('hello'.encode('utf-7'), b'hello') | |
./test/test_unicode.py: self.assertEqual('hello'.encode('utf-8'), b'hello') | |
./test/test_unicode.py: self.assertEqual('hello'.encode('utf-8'), b'hello') | |
./test/test_unicode.py: self.assertEqual('hello'.encode('utf-16-le'), b'h\000e\000l\000l\000o\000') | |
./test/test_unicode.py: self.assertEqual('hello'.encode('utf-16-be'), b'\000h\000e\000l\000l\000o') | |
./test/test_unicode.py: self.assertEqual('hello'.encode('latin-1'), b'hello') | |
./test/test_unicode.py: self.assertEqual('\u2603'.encode(), b'\xe2\x98\x83') | |
./test/test_unicode.py: self.assertEqual(str(u.encode(encoding),encoding), u) | |
./test/test_unicode.py: self.assertEqual(str(u.encode(encoding),encoding), u) | |
./test/test_unicode.py: self.assertEqual(str(u.encode(encoding),encoding), u) | |
./test/test_unicode.py: self.assertEqual(str(u.encode(encoding),encoding), u) | |
./test/test_unicode.py: self.assertEqual(str(u.encode(encoding),encoding), u) | |
./test/test_unicode.py: self.assertEqual(str(s, encoding).encode(encoding), s) | |
./test/test_unicode.py: self.assertEqual(str(s, encoding).encode(encoding), s) | |
./test/test_unicode.py: y = x.encode("raw-unicode-escape").decode("raw-unicode-escape") | |
./test/test_unicode.py: x = y.decode("raw-unicode-escape").encode("raw-unicode-escape") | |
./test/test_unicode.py: x = y.decode("raw-unicode-escape").encode("raw-unicode-escape") | |
./test/test_unicode.py: br'\U11111111'.decode("raw-unicode-escape") | |
./test/test_unicode.py: b'%.5s', 'abc[\u20ac]'.encode('utf8')) | |
./test/test_unicode.py: b'%.5V', None, 'abc[\u20ac]'.encode('utf8')) | |
./test/test_unicode.py: abc = text.encode('unicode_internal') | |
./test/test_unicode.py: self.assertEqual(abc.decode('unicode_internal'), text) | |
./test/test_unicode.py: abcdef = text.encode('unicode_internal') | |
./test/test_unicode.py: self.assertEqual(abcdef.decode('unicode_internal'), text) | |
./test/test_unicode.py: self.assertEqual(getargs_s_hash(s), chr(k).encode() * (i + 1)) | |
./test/test_unicode.py: self.assertEqual(getargs_s_hash(s), chr(k).encode() * (i + 1)) | |
./test/test_tarfile.py: data = fobj.read().encode("iso8859-1") | |
./test/test_tarfile.py: s = b.decode(self.tar.encoding, 'surrogateescape') | |
./test/test_tarfile.py: return s.encode('ascii', 'backslashreplace') | |
./test/test_tarfile.py: return out.replace(os.linesep.encode(), b'\n') | |
./test/test_tarfile.py: expected = t.getvalue().encode('ascii', 'backslashreplace') | |
./test/test_tarfile.py: expected = t.getvalue().encode('ascii', 'backslashreplace') | |
./test/test_fileio.py: fn = TESTFN.encode("ascii") | |
./test/test_gdb.py: return out.decode('utf-8', 'replace'), err.decode('utf-8', 'replace') | |
./test/test_gdb.py: text.encode(encoding) | |
./test/test_tempfile.py: os.write(write_fd, next(self.r).encode("ascii")) | |
./test/test_tempfile.py: child_value = os.read(read_fd, len(parent_value)).decode("ascii") | |
./test/test_tempfile.py: sys.stdout.buffer.write(tmp.name.encode()) | |
./test/test_tempfile.py: tmp_name = out.decode().strip() | |
./test/test_tempfile.py: err = err.decode('utf-8', 'backslashreplace') | |
./test/test_tempfile.py: sys.stdout.buffer.write(next(g).encode()) | |
./test/test_tempfile.py: tmp_name = out.decode().strip() | |
./test/test_tempfile.py: err = err.decode('utf-8', 'backslashreplace') | |
./test/test_pep3120.py: "Питон".encode("utf-8"), | |
./test/test_pep3120.py: "\П".encode("utf-8"), | |
./test/test_pep3120.py: source_code = '# coding: Latin-1\nu = "Ç"\n'.encode("Latin-1") | |
./test/test_faulthandler.py: output = output.decode('ascii', 'backslashreplace') | |
./test/test_faulthandler.py: output = output.decode('ascii', 'backslashreplace') | |
./test/test_ssl.py: idna = 'püthon.python.org'.encode("idna").decode("ascii") | |
./test/test_ssl.py: idna = 'www*.pythön.org'.encode("idna").decode("ascii") | |
./test/test_ssl.py: ok(cert, 'www.pythön.org'.encode("idna").decode("ascii")) | |
./test/test_ssl.py: ok(cert, 'www1.pythön.org'.encode("idna").decode("ascii")) | |
./test/test_ssl.py: fail(cert, 'ftp.pythön.org'.encode("idna").decode("ascii")) | |
./test/test_ssl.py: fail(cert, 'pythön.org'.encode("idna").decode("ascii")) | |
./test/test_ssl.py: ctx.load_cert_chain(CERTFILE_PROTECTED, password=KEY_PASSWORD.encode()) | |
./test/test_ssl.py: password=bytearray(KEY_PASSWORD.encode())) | |
./test/test_ssl.py: ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED, KEY_PASSWORD.encode()) | |
./test/test_ssl.py: bytearray(KEY_PASSWORD.encode())) | |
./test/test_ssl.py: return KEY_PASSWORD.encode() | |
./test/test_ssl.py: return bytearray(KEY_PASSWORD.encode()) | |
./test/test_ssl.py: self.write(repr(data).encode("us-ascii") + b"\n") | |
./test/test_ssl.py: indata = (data_prefix + meth_name).encode('ascii') | |
./test/test_ssl.py: indata = (data_prefix + meth_name).encode('ascii') | |
./test/test_ssl.py: repr(cb_data).encode("us-ascii")) | |
./test/test_ssl.py: repr(new_cb_data).encode("us-ascii")) | |
./test/test_bz2.py: bytes_filename = str_filename.encode("ascii") | |
./test/test_bz2.py: text = self.TEXT.decode("ascii") | |
./test/test_bz2.py: file_data = self.decompress(f.read()).decode("ascii") | |
./test/test_bz2.py: file_data = self.decompress(f.read()).decode("ascii") | |
./test/test_bz2.py: text = self.TEXT.decode("ascii") | |
./test/test_bz2.py: text = self.TEXT.decode("ascii") | |
./test/test_bz2.py: file_data = self.decompress(f.read()).decode("utf-16-le") | |
./test/test_bz2.py: text = self.TEXT.decode("ascii") | |
./test/test_array.py: array.array, 'u', mformat_code, teststr.encode(encoding)) | |
./test/test_posix.py: res = posix.read(b, 9).decode(encoding="utf-8") | |
./test/test_httplib.py: text = text.encode("ascii") | |
./test/test_httplib.py: lcKey = kv[0].decode('ascii').lower() | |
./test/test_xmlrpc.py: t1.decode(d) | |
./test/test_xmlrpc.py: dbytes = dstr.encode('ascii') | |
./test/test_xmlrpc.py: t1.decode(de) | |
./test/test_xml_etree.py: SIMPLE_XMLFILE.encode("utf-8") | |
./test/test_xml_etree.py: stringfile = io.BytesIO(SAMPLE_XML.encode("utf-8")) | |
./test/test_xml_etree.py: self.assertEqual(ET.XML(xml.encode(encoding)).text, body) | |
./test/test_xml_etree.py: return xml(encoding).encode(encoding) | |
./test/test_xml_etree.py: self.assertRaises(ValueError, ET.XML, xml('undefined').encode('ascii')) | |
./test/test_xml_etree.py: self.assertRaises(LookupError, ET.XML, xml('xxx').encode('ascii')) | |
./test/test_xml_etree.py: "<tag>abc</tag>" % enc).encode(enc)) | |
./test/test_xml_etree.py: "<tag>abc</tag>" % upper).encode(enc)) | |
./test/test_xml_etree.py: "<tag><&\"'></tag>" % enc).encode(enc)) | |
./test/test_xml_etree.py: "<tag key=\"<&"'>\" />" % enc).encode(enc)) | |
./test/test_xml_etree.py: "<tag>åöö<></tag>" % enc).encode(enc)) | |
./test/test_xml_etree.py: "<tag key=\"åöö<>\" />" % enc).encode(enc)) | |
./test/test_xml_etree.py: '''<site />'''.encode("utf-16")) | |
./test/test_xml_etree.py: '''<site />'''.encode("utf-16")) | |
./test/test_xml_etree.py: '''<site />'''.encode("utf-16")) | |
./test/test_wsgiref.py: ]).encode('iso-8859-1')] | |
./test/test_wsgiref.py: "Hello, world!").encode("iso-8859-1") | |
./test/test_wsgiref.py: ver = sys.version.split()[0].encode('ascii') | |
./test/test_wsgiref.py: py = python_implementation().encode('ascii') | |
./test/test_wsgiref.py: return [e['wsgi.url_scheme'].encode('iso-8859-1')] | |
./test/test_wsgiref.py: s('200 OK',[])(e['wsgi.url_scheme'].encode('iso-8859-1')) | |
./test/test_wsgiref.py: return ['\u0442\u0435\u0441\u0442'.encode("utf-8")] | |
./test/test_wsgiref.py: "http").encode("iso-8859-1")) | |
./test/test_wsgiref.py: "http").encode("iso-8859-1")) | |
./test/test_wsgiref.py: "\r\n").encode("iso-8859-1")) | |
./test/test_wsgiref.py: "\r\n" % (h.error_status,len(h.error_body))).encode('iso-8859-1') | |
./test/test_wsgiref.py: "\r\n".encode("iso-8859-1")+MSG)) | |
./test/test_wsgiref.py: ).encode("iso-8859-1") | |
./test/test_wsgiref.py: re.match((stdpat%(version,sw)).encode("iso-8859-1"), | |
./test/test_wsgiref.py: ((stdpat%(version,sw)).encode("iso-8859-1"), | |
./test/test_uuid.py: os.write(fds[1], value.hex.encode('latin-1')) | |
./test/test_uuid.py: child_value = os.read(fds[0], 100).decode('latin-1') | |
./test/test_smtplib.py: mexpect = '%s%s\n%s' % (MSG_BEGIN, m.decode('ascii'), MSG_END) | |
./test/test_smtplib.py: expected_unknown = (550, ('No such user: %s' % u).encode('ascii')) | |
./test/test_zipfile64.py: self.data = '\n'.join(line_gen).encode('ascii') | |
./test/test_zipfile64.py: content = zipf2.read("foo%08d" % i).decode('ascii') | |
./test/test_zipfile64.py: content = zipf2.read("foo%08d" % i).decode('ascii') | |
./test/multibytecodec_support.py: u = self.decode(native)[0] | |
./test/multibytecodec_support.py: self.assertEqual(u, utf8.decode('utf-8')) | |
./test/multibytecodec_support.py: self.assertEqual(native, self.encode(u)[0]) | |
./test/multibytecodec_support.py: '%a.decode(%r, %r)=%a != %a' | |
./test/multibytecodec_support.py: '%a.encode(%r, %r)=%a != %a' | |
./test/multibytecodec_support.py: self.encode(s, "xmlcharrefreplace")[0], | |
./test/multibytecodec_support.py: self.assertEqual(self.encode(sin, | |
./test/multibytecodec_support.py: enc = self.encode("abc" + self.unmappedunicode + "def", "test.cjktest")[0] | |
./test/multibytecodec_support.py: self.assertEqual(self.encode('abcd' + self.unmappedunicode + 'efgh', | |
./test/multibytecodec_support.py: self.assertEqual(self.encode('abcd' + self.unmappedunicode + 'efgh', | |
./test/multibytecodec_support.py: self.assertEqual(self.encode('abcd' + self.unmappedunicode + 'efgh', | |
./test/multibytecodec_support.py: e = encoder.encode(data) | |
./test/multibytecodec_support.py: u = decoder.decode(data) | |
./test/multibytecodec_support.py: self.assertEqual(e.encode(inv, True), b'') | |
./test/multibytecodec_support.py: self.assertEqual(e.encode(inv, True), b'called') | |
./test/multibytecodec_support.py: self.assertEqual(e.encode(inv, True), b'') | |
./test/multibytecodec_support.py: self.assertEqual(unich.encode(self.encoding), csetch) | |
./test/multibytecodec_support.py: '%a.decode(%r, %r)=%a != %a' | |
./test/multibytecodec_support.py: '%a.encode(%r, %r)=%a != %a' | |
./test/test_asyncio/test_windows_events.py: w.write('lower-{}\n'.format(i).encode()) | |
./test/test_asyncio/test_windows_events.py: self.assertEqual(response, 'LOWER-{}\n'.format(i).encode()) | |
./test/test_asyncio/echo3.py: os.write(2, b'ERR:' + ex.__class__.__name__.encode('ascii')) | |
./test/test_base64.py: base64.encode(infp, outfp) | |
./test/test_base64.py: base64.decode(infp, outfp) | |
./test/test_base64.py: eq(base64.b64decode(data.decode('ascii')), res) | |
./test/test_base64.py: data_str = data.decode('ascii') | |
./test/test_base64.py: altchars_str = altchars.decode('ascii') | |
./test/test_base64.py: eq(base64.standard_b64decode(data.decode('ascii')), res) | |
./test/test_base64.py: eq(base64.urlsafe_b64decode(data.decode('ascii')), res) | |
./test/test_base64.py: self.assertEqual(base64.b64decode(bstr.decode('ascii')), res) | |
./test/test_base64.py: base64.b64decode(bstr.decode('ascii'), validate=True) | |
./test/test_base64.py: eq(base64.b32decode(data.decode('ascii')), res) | |
./test/test_base64.py: eq(base64.b32decode(data.decode('ascii'), True), res) | |
./test/test_base64.py: data_str = data.decode('ascii') | |
./test/test_base64.py: map01_str = map01.decode('ascii') | |
./test/test_base64.py: base64.b32decode(data.decode('ascii')) | |
./test/test_base64.py: eq(base64.a85decode(data.decode("ascii"), adobe=False), res, data) | |
./test/test_base64.py: eq(base64.a85decode('<~%s~>' % data.decode("ascii"), adobe=True), | |
./test/test_base64.py: eq(base64.b85decode(data.decode("ascii")), res) | |
./test/test_cgitb.py: out = out.decode(sys.getfilesystemencoding()) | |
./test/test_cgitb.py: out = out.decode(sys.getfilesystemencoding()) | |
./test/test_httpservers.py: body = self.headers['x-special-incoming'].encode('utf-8') | |
./test/test_httpservers.py: self.assertEqual(res.read(), 'Ärger mit Unicode'.encode('utf-8')) | |
./test/test_httpservers.py: .encode(enc, 'surrogateescape'), body) | |
./test/test_httpservers.py: .encode(enc, 'surrogateescape'), body) | |
./test/test_httpservers.py: linesep = os.linesep.encode('ascii') | |
./test/test_httpservers.py: self.pythonexe.encode('utf-8') | |
./test/test_venv.py: self.assertEqual(out.strip(), expected.encode()) | |
./test/test_venv.py: self.assertEqual(out.strip(), envpy.encode()) | |
./test/test_venv.py: self.assertEqual(out.strip(), envpy.encode()) | |
./test/test_venv.py: err = err.decode("latin-1") # Force to text, prevent decoding errors | |
./test/test_venv.py: out = out.decode("latin-1") # Force to text, prevent decoding errors | |
./test/test_venv.py: details = exc.output.decode(errors="replace") | |
./test/test_venv.py: err = err.decode("latin-1") # Force to text, prevent decoding errors | |
./test/test_venv.py: out = out.decode("latin-1") # Force to text, prevent decoding errors | |
./test/test_venv.py: env_dir = os.fsencode(self.env_dir).decode("latin-1") | |
./test/test_venv.py: err = err.decode("latin-1") # Force to text, prevent decoding errors | |
./test/test_venv.py: out = out.decode("latin-1") # Force to text, prevent decoding errors | |
Binary file ./test/test_source_encoding.py matches | |
./test/test_gzip.py: expected = self.filename.encode('Latin-1') + b'\x00' | |
./test/test_gzip.py: lines = (data1 * 50).decode("ascii").splitlines(keepends=True) | |
./test/test_gzip.py: bytes_filename = str_filename.encode("ascii") | |
./test/test_gzip.py: uncompressed = data1.decode("ascii") * 50 | |
./test/test_gzip.py: file_data = gzip.decompress(f.read()).decode("ascii") | |
./test/test_gzip.py: file_data = gzip.decompress(f.read()).decode("ascii") | |
./test/test_gzip.py: uncompressed_str = uncompressed_bytes.decode("ascii") | |
./test/test_gzip.py: uncompressed = data1.decode("ascii") * 50 | |
./test/test_gzip.py: file_data = gzip.decompress(f.read()).decode("utf-16") | |
./test/test_gzip.py: uncompressed = data1.decode("ascii") * 50 | |
./test/support/__init__.py:# TESTFN_UNENCODABLE.encode(TESTFN_ENCODING) | |
./test/support/__init__.py:# b'\xff'.decode(TESTFN_ENCODING) | |
./test/support/__init__.py:# + b'-\xff'.decode(TESTFN_ENCODING, 'surrogateescape') | |
./test/support/__init__.py:# name.decode(TESTFN_ENCODING) | |
./test/test_mailbox.py: key = self._box.add(self._nonascii_msg.encode('latin-1')) | |
./test/test_mailbox.py: self._nonascii_msg.encode('latin-1')) | |
./test/test_mailbox.py: key = self._box.add(subj.encode('latin-1')) | |
./test/test_mailbox.py: """).encode('utf-8') | |
./test/test_mailbox.py: os.linesep.encode())) | |
./test/test_mailbox.py: (self._template % 0).encode('ascii')) | |
./test/test_mailbox.py: self.assertEqual(data0.decode('ascii').replace(os.linesep, '\n'), | |
./test/test_mailbox.py: self.assertEqual(data1.decode('ascii').replace(os.linesep, '\n'), | |
./test/test_mailbox.py: _bytes_sample_message.replace(b'\n', os.linesep.encode())) | |
./test/test_mailbox.py: linesep = os.linesep.encode() | |
./test/test_mailbox.py: linesep = os.linesep.encode() | |
./test/test_mailbox.py: linesep = os.linesep.encode() | |
./test/test_mailbox.py: linesep = os.linesep.encode() | |
./test/test_mailbox.py:_bytes_sample_message = _sample_message.encode('ascii') | |
./test/test_poplib.py: asynchat.async_chat.push(self, data.encode("ISO-8859-1") + b'\r\n') | |
./test/test_curses.py: ch.encode(encoding) | |
./test/test_configparser.py: file_paths.append(file_paths[0].encode('utf8')) | |
./test/test_bytes.py: self.assertEqual(b, self.type2test(sample.encode(enc))) | |
./test/test_bytes.py: self.assertEqual(b.decode(enc), sample) | |
./test/test_bytes.py: self.assertEqual(b.decode("utf-8", "ignore"), "Hello world\n") | |
./test/test_bytes.py: self.assertEqual(b.decode(errors="ignore", encoding="utf-8"), | |
./test/test_bytes.py: self.assertEqual(self.type2test(b'\xe2\x98\x83').decode(), '\u2603') | |
./test/test_bytes.py: return obj.encode("utf-8") | |
./test/test_builtin.py: str('\\U0010ffff'.encode("ascii"), 'unicode-escape')) | |
./test/test_builtin.py: child_output = child_output.decode("ascii", "ignore") | |
./test/test_builtin.py: expected = terminal_input.decode(stdio_encoding, 'surrogateescape') | |
./test/test_builtin.py: expected = terminal_input.decode(sys.stdin.encoding) # what else? | |
./test/test_builtin.py: self.assertEqual(["before", "after"], out.decode().splitlines()) | |
./test/test_os.py: fname = self.fname.encode(sys.getfilesystemencoding()) | |
./test/test_os.py: value_bytes = value.encode(sys.getfilesystemencoding(), | |
./test/test_os.py: value_str = value.decode(sys.getfilesystemencoding(), 'surrogateescape') | |
./test/test_os.py: self.assertEqual(msg, buf.value.decode()) | |
./test/test_os.py: size = subprocess.check_output(['stty', 'size']).decode().split() | |
./test/test_email/test_contentmanager.py: """).encode('latin1')) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: """).encode('utf-8')) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: """).encode('utf-8')) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: """).encode('utf-8')) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: """).encode('utf-8')) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: """).encode('utf-8')) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: """).encode('utf-8')) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: """).encode('utf-8')) | |
./test/test_email/test_contentmanager.py: self.assertEqual(m.get_payload(decode=True).decode('utf-8'), content) | |
./test/test_email/test_contentmanager.py: """).encode('utf-8')) | |
./test/test_email/test_contentmanager.py: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz""").encode('latin-1')) | |
./test/test_email/test_contentmanager.py: """).encode('ascii') + | |
./test/test_email/test_contentmanager.py: """).encode('ascii') + | |
./test/test_email/test_contentmanager.py: """).encode('ascii')) | |
./test/test_email/test__header_value_parser.py: badstr = b"le pouf c\xaflebre".decode('ascii', 'surrogateescape') | |
./test/test_email/test__header_value_parser.py: rfc_printable_ascii = bytes(range(33, 127)).decode('ascii') | |
./test/test_email/test__header_value_parser.py: b'test \xACfoo val'.decode('ascii', 'surrogateescape'), | |
./test/test_email/test__header_value_parser.py: b' val').decode('ascii', 'surrogateescape'), | |
./test/test_email/test_asian_codecs.py: eq(h.encode(), """\ | |
./test/test_email/test_asian_codecs.py: eq(decode_header(h.encode()), | |
./test/test_email/test_asian_codecs.py: enc = h.encode() | |
./test/test_email/test_asian_codecs.py: eq(str(h).encode(jcode), subject_bytes) | |
./test/test_email/test_asian_codecs.py: ustr = msg.get_payload(decode=True).decode(msg.get_content_charset()) | |
./test/test_email/test_asian_codecs.py: ustr = msg.get_payload(decode=True).decode(msg.get_content_charset()) | |
./test/test_email/test_generator.py: typ = lambda self, x: x.encode('ascii') | |
./test/test_email/test_generator.py: "collègue\n\n").encode('utf-8') | |
./test/test_email/test_generator.py: 'pr=C3=A9sente_mon_coll=C3=A8gue?=\n\n').encode('ascii') | |
./test/test_email/test_generator.py: """).encode('latin1') | |
./test/test_email/test_generator.py: """).encode('ascii') | |
./test/test_email/test_email.py: msg.set_payload(data.decode('utf-8'), charset) | |
./test/test_email/test_email.py: msgdata = fp.read().encode('ascii') | |
./test/test_email/test_email.py: data = fp.read().encode('ascii') | |
./test/test_email/test_email.py: x = 'this is a quéstionable thing to do'.encode('utf-8') | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(maxlinelen=76), """\ | |
./test/test_email/test_email.py: eq(h.encode(), '''\ | |
./test/test_email/test_email.py: eq(h.encode(), '''\ | |
./test/test_email/test_email.py: eq(h.encode(), '''\ | |
./test/test_email/test_email.py: self.assertEqual(h.encode(), "=?iso-2022-jp?b?GyRCSjgbKEI=?=") | |
./test/test_email/test_email.py: b'\xa4\xa4\xde\xa4\xb9'.decode('euc-jp'), 'euc-jp') | |
./test/test_email/test_email.py: self.assertEqual(h.encode(), res) | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), "this_part_does_not_fit_within_maxlinelen_and_thus_should_" | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), "thisverylongheaderhas;semicolons;and,commas,butthey;" | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), "this_part_does_not_fit_within_maxlinelen_and_thus_" | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(), """\ | |
./test/test_email/test_email.py: eq(h.encode(maxlinelen=76), """\ | |
./test/test_email/test_email.py: eq(h.encode(maxlinelen=76), """\ | |
./test/test_email/test_email.py: eq(h.encode(), | |
./test/test_email/test_email.py: eq(h.encode(maxlinelen=76), """\ | |
./test/test_email/test_email.py: self.assertEqual(h.encode()+'\n', textwrap.dedent("""\ | |
./test/test_email/test_email.py: """).encode('utf-8') | |
./test/test_email/test_email.py: eq(msg.get_payload(decode=True), teststr.encode('utf-8')) | |
./test/test_email/test_email.py: self.ndiffAssertEqual(header.encode(maxlinelen=76), """\ | |
./test/test_email/test_email.py: self.assertEqual(make_header(decode_header(s)).encode(), s.lower()) | |
./test/test_email/test_email.py: self.assertEqual(make_header(decode_header(s)).encode(), | |
./test/test_email/test_email.py: self.assertEqual(s.getvalue().decode('ascii'), msgtxt) | |
./test/test_email/test_email.py: bodyline='pöstal').encode('utf-8') | |
./test/test_email/test_email.py: "pöstal\n".encode('utf-8')) | |
./test/test_email/test_email.py: bodyline='pöstal').encode('utf-8') | |
./test/test_email/test_email.py: "pöstal\n".encode('utf-8')) | |
./test/test_email/test_email.py: bodyline='p=C3=B6stál').encode('utf-8') | |
./test/test_email/test_email.py: 'pöstál\n'.encode('utf-8')) | |
./test/test_email/test_email.py: bodyline='p=C3=B6stál').encode('utf-8') | |
./test/test_email/test_email.py: 'pöstál\n'.encode('utf-8')) | |
./test/test_email/test_email.py: bodyline='cMO2c3RhbAá=').encode('utf-8') | |
./test/test_email/test_email.py: 'pöstal'.encode('utf-8')) | |
./test/test_email/test_email.py: bodyline='<,.V<W1A; á ').encode('utf-8') | |
./test/test_email/test_email.py: '<,.V<W1A; á \n'.encode('utf-8')) | |
./test/test_email/test_email.py: '\nYes, they are flying.\n').encode('utf-8') | |
./test/test_email/test_email.py: """).encode('latin-1')) | |
./test/test_email/test_email.py: 'X-Header: foo=\xa7ne; b\xa7r=two; baz=three\n'.encode('latin-1')) | |
./test/test_email/test_email.py: ).encode('latin-1')) | |
./test/test_email/test_email.py: ).encode('latin-1')) | |
./test/test_email/test_email.py: ).encode('latin-1')) | |
./test/test_email/test_email.py: """).encode('latin-1')) | |
./test/test_email/test_email.py: """).encode('utf-8') | |
./test/test_email/test_email.py: """).encode('latin-1') | |
./test/test_email/test_email.py: self.latin_bin_msg.decode('latin-1')+'\n') | |
./test/test_email/test_email.py: """).encode('utf-8') | |
./test/test_email/test_email.py: eq(base64mime.decode(''), b'') | |
./test/test_email/test_email.py: eq(base64mime.decode('aGVsbG8='), b'hello') | |
./test/test_email/test_email.py: decoded = quoprimime.decode(encoded) | |
./test/test_email/test_email.py: decoded = quoprimime.decode(encoded, eol=eol) | |
./test/test_email/test_email.py: self._test_encode('hello\u03c5\n'.encode('utf-8').decode('latin1'), | |
./test/test_email/test_email.py: eq(h.encode(), 'Hello World!') | |
./test/test_email/test_email.py: eq(h.encode(), 'Hello World! Goodbye World!') | |
./test/test_email/test_email.py: eq(h.encode(), 'Hello World!') | |
./test/test_email/test_email.py: eq(h.encode(), 'Hello World! Goodbye World!') | |
./test/test_email/test_email.py: for l in h.encode(splitchars=' ').split('\n '): | |
./test/test_email/test_email.py: enc = h.encode(maxlinelen=76) | |
./test/test_email/test_email.py: eq(decoded[2], (utf8_head.encode('utf-8'), 'utf-8')) | |
./test/test_email/test_email.py: ).decode('utf-8')) | |
./test/test_email/test_email.py: self.assertEqual(h.encode(), '') | |
./test/test_email/test_email.py: eq(h.encode(), '''\ | |
./test/test_email/test_email.py: eq(h.encode(), '''\ | |
./test/test_email/test_email.py: eq(h.encode(), hstr) | |
./test/test_email/test_email.py: s = h.encode() | |
./test/test_email/test_email.py: s = h.encode() | |
./test/test_email/test_email.py: s = h.encode() | |
./test/test_email/test_email.py: s = h.encode() | |
./test/test_email/test_email.py: eq(s, h.encode()) | |
./test/test_email/test_email.py: eq(h.encode(), '=?utf-8?q?p=C3=B6stal?=') | |
./test/test_email/test_email.py: eq(h.encode(), '=?utf-8?b?6I+K5Zyw5pmC5aSr?=') | |
./test/test_email/test_email.py: e = x.decode('utf-8', 'replace') | |
./test/test_email/test_email.py: e = x.decode('ascii', 'surrogateescape') | |
./test/test_email/test_email.py: s = h.encode() | |
./test/test_email/test_email.py: eq(h.encode(), s) | |
./test/test_email/test_email.py: eq(hdr.encode(), | |
./test/test_email/test_email.py: self.assertEqual(h.encode(), '=?iso-2022-jp?b?GyRCSjgbKEI=?=') | |
./test/test_email/test__encoded_words.py: _ew.decode('=?badone?=') | |
./test/test_email/test__encoded_words.py: _ew.decode('=?') | |
./test/test_email/test__encoded_words.py: _ew.decode('') | |
./test/test_email/test__encoded_words.py: res, char, l, d = _ew.decode(source) | |
./test/test_email/test__encoded_words.py: self._test(b'=?us-ascii?q?=20\xACfoo?='.decode('us-ascii', | |
./test/test_email/test__encoded_words.py: self._test(b'=?us-ascii?b?dm\xACk?='.decode('us-ascii', | |
./test/test_email/test__encoded_words.py: b'foo\xacbar'.decode('ascii', 'surrogateescape'), | |
./test/test_email/test__encoded_words.py: b'foo\xacbar'.decode('ascii', 'surrogateescape'), | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('foo', 'utf-8', 'q'), '=?utf-8?q?foo?=') | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('foo', 'utf-8', 'b'), '=?utf-8?b?Zm9v?=') | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('foo', 'utf-8'), '=?utf-8?q?foo?=') | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('vi.', 'utf-8'), '=?utf-8?q?vi=2E?=') | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('.....', 'utf-8'), '=?utf-8?b?Li4uLi4=?=') | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('vi.vi.vi.vi.vi.', 'utf-8'), | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('vi vi vi.vi ', 'utf-8'), | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('foo'), '=?utf-8?q?foo?=') | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('foo', lang='jive'), '=?utf-8*jive?q?foo?=') | |
./test/test_email/test__encoded_words.py: self.assertEqual(_ew.encode('foo\uDCACbar', charset='unknown-8bit'), | |
./test/test_email/test_headerregistry.py: # 'baz=thr\xa7e'.encode('latin-1').decode('us-ascii', | |
./test/test_email/test_headerregistry.py: # 'not%20f\xa7n').encode('latin-1').decode('us-ascii', | |
./test/test_subprocess.py: normcase(p.stdout.read().decode("utf-8"))) | |
./test/test_subprocess.py: self.assertStderrEqual(stderr.encode(), b"pineapple\npear\n") | |
./test/test_subprocess.py: 'buf.write(sys.stdin.readline().encode());' | |
./test/test_subprocess.py: 'buf.write(sys.stdin.read().encode());' | |
./test/test_subprocess.py: r"sys.stdout.buffer.write('1\r\n2\r3\n4'.encode('%s'))" % | |
./test/test_subprocess.py: line = b'line' + os.linesep.encode() # assume ascii-based locale | |
./test/test_subprocess.py: encoded_value = value.encode("ascii", "surrogateescape") | |
./test/test_subprocess.py: decoded_value = encoded_value.decode("latin1", "surrogateescape") | |
./test/test_subprocess.py: self.assertEqual(stdout.decode('ascii'), ascii(decoded_value)) | |
./test/test_subprocess.py: key = key.encode("ascii", "surrogateescape") | |
./test/test_subprocess.py: self.assertEqual(stdout.decode('ascii'), ascii(encoded_value)) | |
./test/test_subprocess.py: stderr.decode('utf-8')) | |
./test/test_subprocess.py: p.stdout.read ().decode("mbcs"), | |
./test/test_cgi.py: fp = BytesIO(buf.encode('latin-1')) # FieldStorage expects bytes | |
./test/test_cgi.py: fake_stdin = BytesIO(data.encode(encoding)) | |
./test/test_cgi.py: fp = BytesIO(POSTDATA.encode('latin1')) | |
./test/test_cgi.py: env = {'boundary': BOUNDARY.encode('latin1'), | |
./test/test_cgi.py: fp = BytesIO(POSTDATA.encode('latin-1')) | |
./test/test_cgi.py: fp = BytesIO(b"\r\n" + POSTDATA.encode('latin-1')) | |
./test/test_cgi.py: fp = BytesIO(POSTDATA_NON_ASCII.encode(encoding)) | |
./test/test_cgi.py: {'upload': content.encode('latin1')}) | |
./test/test_cgi.py: fp = BytesIO(POSTDATA_W3.encode('latin-1')) | |
./test/test_cgi.py: fp = BytesIO(POSTDATA.encode('latin-1')) | |
./test/test_import.py: path.encode(encoding) | |
./test/test_pydoc.py: encoded = nonascii.__doc__.encode('ascii', 'backslashreplace') | |
./test/test_pydoc.py: result = run_pydoc(modname, PYTHONPATH=TESTFN).decode("ascii") | |
./test/test_threaded_import.py: f.write(contents.encode('utf-8')) | |
./test/test_threaded_import.py: f.write(code.encode('utf-8')) | |
./test/test_codecs.py: part1 = d.decode(s[:i]) | |
./test/test_codecs.py: self.assertTrue(not d.decode(state[0])) | |
./test/test_codecs.py: part2 = d.decode(s[i:], True) | |
./test/test_codecs.py: part1 = d.encode(u[:i]) | |
./test/test_codecs.py: part2 = d.encode(u[i:], True) | |
./test/test_codecs.py: for (c, partialresult) in zip(input.encode(self.encoding), partialresults): | |
./test/test_codecs.py: for (c, partialresult) in zip(input.encode(self.encoding), partialresults): | |
./test/test_codecs.py: result += d.decode(bytes([c])) | |
./test/test_codecs.py: self.assertEqual(d.decode(b"", True), "") | |
./test/test_codecs.py: for (c, partialresult) in zip(input.encode(self.encoding), partialresults): | |
./test/test_codecs.py: result += d.decode(bytes([c])) | |
./test/test_codecs.py: self.assertEqual(d.decode(b"", True), "") | |
./test/test_codecs.py: encoded = input.encode(self.encoding) | |
./test/test_codecs.py: stream = io.BytesIO(input.encode(self.encoding)) | |
./test/test_codecs.py: stream = io.BytesIO(data.encode(self.encoding)) | |
./test/test_codecs.py: stream = io.BytesIO("".join(s).encode(self.encoding)) | |
./test/test_codecs.py: s = (s1+s2+s3).encode(self.encoding) | |
./test/test_codecs.py: s = (s1+s2+s3+s4+s5).encode(self.encoding) | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode(self.encoding, "backslashreplace"), | |
./test/test_codecs.py: "[\\udc80]".encode(self.encoding)) | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode(self.encoding, "xmlcharrefreplace"), | |
./test/test_codecs.py: "[�]".encode(self.encoding)) | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode(self.encoding, "ignore"), | |
./test/test_codecs.py: "[]".encode(self.encoding)) | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode(self.encoding, "replace"), | |
./test/test_codecs.py: "[?]".encode(self.encoding)) | |
./test/test_codecs.py: bom = "".encode(self.encoding) | |
./test/test_codecs.py: before_sequence = before.encode(self.encoding)[len(bom):] | |
./test/test_codecs.py: after_sequence = after.encode(self.encoding)[len(bom):] | |
./test/test_codecs.py: self.assertEqual(test_string.encode(self.encoding, | |
./test/test_codecs.py: self.assertEqual(test_sequence.decode(self.encoding, | |
./test/test_codecs.py: self.assertEqual(test_sequence.decode(self.encoding, "ignore"), | |
./test/test_codecs.py: self.assertEqual(test_sequence.decode(self.encoding, "replace"), | |
./test/test_codecs.py: self.assertEqual("\U00010203".encode(self.encoding), b"\x03\x02\x01\x00") | |
./test/test_codecs.py: self.assertEqual("\U00010203".encode(self.encoding), b"\x00\x01\x02\x03") | |
./test/test_codecs.py: s = s1.encode(self.encoding) | |
./test/test_codecs.py: self.assertEqual(raw.decode('utf-16le', 'replace'), expected) | |
./test/test_codecs.py: self.assertEqual("\U00010203".encode(self.encoding), | |
./test/test_codecs.py: self.assertEqual(b'\x00\xd8\x03\xde'.decode(self.encoding), | |
./test/test_codecs.py: self.assertEqual(raw.decode('utf-16be', 'replace'), expected) | |
./test/test_codecs.py: self.assertEqual("\U00010203".encode(self.encoding), | |
./test/test_codecs.py: self.assertEqual(b'\xd8\x00\xde\x03'.decode(self.encoding), | |
./test/test_codecs.py: u, u.encode(self.encoding)) | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode('utf-8', "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual("abc\ud800def".encode("utf-8", "surrogatepass"), | |
./test/test_codecs.py: self.assertEqual(b"abc\xed\xa0\x80def".decode("utf-8", "surrogatepass"), | |
./test/test_codecs.py: self.assertEqual("\U00010fff\uD800".encode("utf-8", "surrogatepass"), | |
./test/test_codecs.py: self.assertEqual(b"\xf0\x90\xbf\xbf\xed\xa0\x80".decode("utf-8", "surrogatepass"), | |
./test/test_codecs.py: b"abc\xed\xa0".decode("utf-8", "surrogatepass") | |
./test/test_codecs.py: b"abc\xed\xa0z".decode("utf-8", "surrogatepass") | |
./test/test_codecs.py: encoded = text.encode('cp65001', errors) | |
./test/test_codecs.py: '%a.encode("cp65001", %r)=%a != %a' | |
./test/test_codecs.py: decoded = raw.decode('cp65001', errors) | |
./test/test_codecs.py: '%a.decode("cp65001", %r)=%a != %a' | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode("cp65001", "backslashreplace"), | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode("cp65001", "xmlcharrefreplace"), | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode("cp65001", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode("cp65001", "ignore"), | |
./test/test_codecs.py: self.assertEqual("[\uDC80]".encode("cp65001", "replace"), | |
./test/test_codecs.py: self.assertEqual("abc\ud800def".encode("cp65001", "surrogatepass"), | |
./test/test_codecs.py: self.assertEqual(b"abc\xed\xa0\x80def".decode("cp65001", "surrogatepass"), | |
./test/test_codecs.py: self.assertEqual("\U00010fff\uD800".encode("cp65001", "surrogatepass"), | |
./test/test_codecs.py: self.assertEqual(b"\xf0\x90\xbf\xbf\xed\xa0\x80".decode("cp65001", "surrogatepass"), | |
./test/test_codecs.py: self.assertEqual(set_d.encode(self.encoding), set_d.encode('ascii')) | |
./test/test_codecs.py: self.assertEqual(set_d.encode('ascii').decode(self.encoding), set_d) | |
./test/test_codecs.py: self.assertEqual(set_o.encode(self.encoding), set_o.encode('ascii')) | |
./test/test_codecs.py: self.assertEqual(set_o.encode('ascii').decode(self.encoding), set_o) | |
./test/test_codecs.py: self.assertEqual('a+b'.encode(self.encoding), b'a+-b') | |
./test/test_codecs.py: self.assertEqual(b'a+-b'.decode(self.encoding), 'a+b') | |
./test/test_codecs.py: self.assertEqual(ws.encode(self.encoding), ws.encode('ascii')) | |
./test/test_codecs.py: self.assertEqual(ws.encode('ascii').decode(self.encoding), ws) | |
./test/test_codecs.py: other_ascii = ''.join(sorted(set(bytes(range(0x80)).decode()) - | |
./test/test_codecs.py: self.assertEqual(other_ascii.encode(self.encoding), | |
./test/test_codecs.py: self.assertEqual(raw.decode('utf-7', 'replace'), expected) | |
./test/test_codecs.py: self.assertEqual('\U000104A0'.encode(self.encoding), b'+2AHcoA-') | |
./test/test_codecs.py: self.assertEqual('\ud801\udca0'.encode(self.encoding), b'+2AHcoA-') | |
./test/test_codecs.py: self.assertEqual(b'+2AHcoA-'.decode(self.encoding), '\U000104A0') | |
./test/test_codecs.py: self.assertEqual(b'+2AHcoA'.decode(self.encoding), '\U000104A0') | |
./test/test_codecs.py: self.assertEqual('\u20ac\U000104A0'.encode(self.encoding), b'+IKzYAdyg-') | |
./test/test_codecs.py: self.assertEqual(b'+IKzYAdyg-'.decode(self.encoding), '\u20ac\U000104A0') | |
./test/test_codecs.py: self.assertEqual(b'+IKzYAdyg'.decode(self.encoding), '\u20ac\U000104A0') | |
./test/test_codecs.py: self.assertEqual('\u20ac\u20ac\U000104A0'.encode(self.encoding), | |
./test/test_codecs.py: self.assertEqual(b'+IKwgrNgB3KA-'.decode(self.encoding), | |
./test/test_codecs.py: self.assertEqual(b'+IKwgrNgB3KA'.decode(self.encoding), | |
./test/test_codecs.py: self.assertEqual(raw.decode('utf-7', 'replace'), expected) | |
./test/test_codecs.py: self.assertEqual(d.decode(s.encode("utf-8-sig")), s) | |
./test/test_codecs.py: str(uni.encode("punycode"), "ascii").lower(), | |
./test/test_codecs.py: self.assertEqual(uni, puny.decode("punycode")) | |
./test/test_codecs.py: puny = puny.decode("ascii").encode("ascii") | |
./test/test_codecs.py: self.assertEqual(uni, puny.decode("punycode")) | |
./test/test_codecs.py: self.assertEqual(uni, internal.decode("unicode_internal")) | |
./test/test_codecs.py: self.assertEqual(invalid.decode("unicode_internal", "replace"), | |
./test/test_codecs.py: b"\x00\x00\x00\x00\x00\x11\x11\x00".decode("unicode_internal") | |
./test/test_codecs.py: ab = "ab".encode("unicode_internal").decode() | |
./test/test_codecs.py: self.assertEqual("python.org".encode("idna"), b"python.org") | |
./test/test_codecs.py: self.assertEqual("python.org.".encode("idna"), b"python.org.") | |
./test/test_codecs.py: self.assertEqual("pyth\xf6n.org".encode("idna"), b"xn--pythn-mua.org") | |
./test/test_codecs.py: self.assertEqual("pyth\xf6n.org.".encode("idna"), b"xn--pythn-mua.org.") | |
./test/test_codecs.py: self.assertEqual(decoder.decode(b"xn--xam", ), "") | |
./test/test_codecs.py: self.assertEqual(decoder.decode(b"ple-9ta.o", ), "\xe4xample.") | |
./test/test_codecs.py: self.assertEqual(decoder.decode(b"rg"), "") | |
./test/test_codecs.py: self.assertEqual(decoder.decode(b"", True), "org") | |
./test/test_codecs.py: self.assertEqual(decoder.decode(b"xn--xam", ), "") | |
./test/test_codecs.py: self.assertEqual(decoder.decode(b"ple-9ta.o", ), "\xe4xample.") | |
./test/test_codecs.py: self.assertEqual(decoder.decode(b"rg."), "org.") | |
./test/test_codecs.py: self.assertEqual(decoder.decode(b"", True), "") | |
./test/test_codecs.py: self.assertEqual(encoder.encode("\xe4x"), b"") | |
./test/test_codecs.py: self.assertEqual(encoder.encode("ample.org"), b"xn--xample-9ta.") | |
./test/test_codecs.py: self.assertEqual(encoder.encode("", True), b"org") | |
./test/test_codecs.py: self.assertEqual(encoder.encode("\xe4x"), b"") | |
./test/test_codecs.py: self.assertEqual(encoder.encode("ample.org."), b"xn--xample-9ta.org.") | |
./test/test_codecs.py: self.assertEqual(encoder.encode("", True), b"") | |
./test/test_codecs.py: "python.org".encode("idna", "strict") | |
./test/test_codecs.py: b"python.org".decode("idna", "strict") | |
./test/test_codecs.py: self.assertEqual(codecs.decode(b'\xe4\xf6\xfc', 'latin-1'), | |
./test/test_codecs.py: self.assertEqual(codecs.decode(b'abc'), 'abc') | |
./test/test_codecs.py: self.assertEqual(codecs.encode('\xe4\xf6\xfc', 'latin-1'), | |
./test/test_codecs.py: self.assertEqual(codecs.encode('abc'), b'abc') | |
./test/test_codecs.py: encodedresult += encoder.encode(c) | |
./test/test_codecs.py: encodedresult += encoder.encode("", True) | |
./test/test_codecs.py: decodedresult += decoder.decode(bytes([c])) | |
./test/test_codecs.py: decodedresult += decoder.decode(b"", True) | |
./test/test_codecs.py: encodedresult = b"".join(encoder.encode(c) for c in s) | |
./test/test_codecs.py: decodedresult = "".join(decoder.decode(bytes([c])) | |
./test/test_codecs.py: encodedresult += cencoder.encode(c) | |
./test/test_codecs.py: encodedresult += cencoder.encode("", True) | |
./test/test_codecs.py: decodedresult += cdecoder.decode(bytes([c])) | |
./test/test_codecs.py: decodedresult += cdecoder.decode(b"", True) | |
./test/test_codecs.py: encodedresult = b"".join(cencoder.encode(c) for c in s) | |
./test/test_codecs.py: decodedresult = "".join(cdecoder.decode(bytes([c])) | |
./test/test_codecs.py: reader = codecs.getreader(encoding)(io.BytesIO(s.encode(encoding))) | |
./test/test_codecs.py: self.check_state_handling_decode(encoding, u, u.encode(encoding)) | |
./test/test_codecs.py: self.check_state_handling_encode(encoding, u, u.encode(encoding)) | |
./test/test_codecs.py: check(chr(b), ('\\x%02x' % b).encode()) | |
./test/test_codecs.py: check(chr(b), ('\\x%02x' % b).encode()) | |
./test/test_codecs.py: self.assertEqual(b"foo\x80bar".decode("utf-8", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual("foo\udc80bar".encode("utf-8", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual(b"\xed\xb0\x80".decode("utf-8", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual("\udced\udcb0\udc80".encode("utf-8", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual(b"foo\x80bar".decode("ascii", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual("foo\udc80bar".encode("ascii", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual(b"foo\xa5bar".decode("iso-8859-3", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual("foo\udca5bar".encode("iso-8859-3", "surrogateescape"), | |
./test/test_codecs.py: self.assertEqual("\udce4\udceb\udcef\udcf6\udcfc".encode("latin-1", "surrogateescape"), | |
./test/test_codecs.py: sin = codecs.encode(b"\x80", encoding) | |
./test/test_codecs.py: sin = codecs.encode(b"\x80", encoding) | |
./test/test_codecs.py: data = codecs.encode(data, encoding) | |
./test/test_codecs.py: view_encoded = codecs.encode(view, encoding) | |
./test/test_codecs.py: data = codecs.decode(data, encoding) | |
./test/test_codecs.py: view_decoded = codecs.decode(view, encoding) | |
./test/test_codecs.py: bad_input.encode(encoding) | |
./test/test_codecs.py: "just an example message".encode("rot_13") | |
./test/test_codecs.py: encoded_data = codecs.encode(data, encoding) | |
./test/test_codecs.py: encoded_data.decode(encoding) | |
./test/test_codecs.py: bytearray(encoded_data).decode(encoding) | |
./test/test_codecs.py: bad_input.decode("rot_13") | |
./test/test_codecs.py: codecs.decode(b"hello", "zlib_codec") | |
./test/test_codecs.py: codecs.decode(b"hello", "hex_codec") | |
./test/test_codecs.py: encoded = codecs.encode(b"space tab\teol \n", "quopri-codec") | |
./test/test_codecs.py: self.assertEqual(codecs.decode(unescaped, "quopri-codec"), unescaped) | |
./test/test_codecs.py: "str_input".encode(self.codec_name) | |
./test/test_codecs.py: codecs.encode("str_input", self.codec_name) | |
./test/test_codecs.py: b"bytes input".decode(self.codec_name) | |
./test/test_codecs.py: codecs.decode(b"bytes input", self.codec_name) | |
./test/test_codecs.py: "str input".encode(self.codec_name) | |
./test/test_codecs.py: codecs.encode("str input", self.codec_name) | |
./test/test_codecs.py: b"bytes input".decode(self.codec_name) | |
./test/test_codecs.py: codecs.decode(b"bytes input", self.codec_name) | |
./test/test_codecs.py: "str input".encode(self.codec_name) | |
./test/test_codecs.py: codecs.encode("str input", self.codec_name) | |
./test/test_codecs.py: b"bytes input".decode(self.codec_name) | |
./test/test_codecs.py: codecs.decode(b"bytes input", self.codec_name) | |
./test/test_codecs.py: encoded = codecs.encode(None, self.codec_name) | |
./test/test_codecs.py: decoded = codecs.decode(None, self.codec_name) | |
./test/test_codecs.py: "str_input".encode(self.codec_name) | |
./test/test_codecs.py: b"bytes input".decode(self.codec_name) | |
./test/test_codecs.py: '%a.decode("cp%s", %r)=%a != %a' | |
./test/test_codecs.py: '%a.encode("cp%s", %r)=%a != %a' | |
./test/test_calendar.py: (result_2004_html % {'e': res}).encode(res) | |
./test/test_calendar.py: return s.replace('\n', os.linesep).encode() | |
./test/test_calendar.py: self.assertIn((' %s' % year).encode(), stdout) | |
./test/test_calendar.py: self.assertEqual(stdout, result_2004_text.encode('utf-16-le')) | |
./test/test_calendar.py: self.assertIn('2004'.encode(enc), stdout) | |
./test/test_calendar.py: self.assertIn(('<title>Calendar for %s</title>' % year).encode(), | |
./test/test_calendar.py: (result_2004_html % {'e': 'ascii'}).encode('ascii')) | |
./uu.py: out_file.write(('begin %o %s\n' % ((mode & 0o777), name)).encode("ascii")) | |
./uu.py: out_file = hdrfields[2].rstrip(b' \t\r\n\f').decode("ascii") | |
./wsgiref/handlers.py: ''.encode('utf-8', esc) | |
./wsgiref/handlers.py: v = v.encode('utf-8').decode('iso-8859-1') | |
./wsgiref/handlers.py: v = v.encode('utf-8').decode('iso-8859-1') | |
./wsgiref/handlers.py: v = v.encode(enc, 'replace').decode('iso-8859-1') | |
./wsgiref/handlers.py: v = v.encode(enc, esc).decode('iso-8859-1') | |
./wsgiref/handlers.py: self._write(('HTTP/%s %s\r\n' % (self.http_version,self.status)).encode('iso-8859-1')) | |
./wsgiref/handlers.py: ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') | |
./wsgiref/handlers.py: self._write(('Server: %s\r\n' % self.server_software).encode('iso-8859-1')) | |
./wsgiref/handlers.py: self._write(('Status: %s\r\n' % self.status).encode('iso-8859-1')) | |
./wsgiref/headers.py: return str(self).encode('iso-8859-1') | |
./wsgiref/simple_server.py: env['PATH_INFO'] = urllib.parse.unquote_to_bytes(path).decode('iso-8859-1') | |
./wsgiref/simple_server.py: return [stdout.getvalue().encode("utf-8")] | |
./gzip.py: fname = fname.encode('latin-1') | |
./gzip.py: self.fileobj.write(chr(flags).encode('latin-1')) | |
./mailbox.py:linesep = os.linesep.encode('ascii') | |
./mailbox.py: return message.encode('ascii') | |
./mailbox.py: msg.set_from(from_line[5:].decode('ascii')) | |
./mailbox.py: author = message.get_from().encode('ascii') | |
./mailbox.py: from_line = from_line.encode('ascii') | |
./mailbox.py: from_line = b'From MAILER-DAEMON ' + time.asctime(time.gmtime()).encode() | |
./mailbox.py: labels = (label.encode() for label in labels) | |
./mailbox.py: self._file.write(b', ' + label.encode()) | |
./mailbox.py: self._file.write(b' ' + label.encode() + b',') | |
./dbm/dumb.py: key = key.encode('Latin-1') | |
./dbm/dumb.py: entry = "%r, %r\n" % (key.decode('Latin-1'), pos_and_siz_pair) | |
./dbm/dumb.py: key = key.encode('utf-8') | |
./dbm/dumb.py: f.write("%r, %r\n" % (key.decode("Latin-1"), pos_and_siz_pair)) | |
./dbm/dumb.py: key = key.encode('utf-8') | |
./dbm/dumb.py: val = val.encode('utf-8') | |
./dbm/dumb.py: key = key.encode('utf-8') | |
./dbm/dumb.py: key = key.encode('utf-8') | |
./calendar.py: return ''.join(v).encode(encoding, "xmlcharrefreplace") | |
./calendar.py: result = result.encode(options.encoding) | |
./smtplib.py: s = s.encode("ascii") | |
./smtplib.py: resp = self.ehlo_resp.decode("latin-1").split('\n') | |
./smtplib.py: msg = _fix_eols(msg).encode('ascii') | |
./smtplib.py: response = user + " " + hmac.HMAC(password.encode('ascii'), | |
./smtplib.py: return encode_base64(response.encode('ascii'), eol='') | |
./smtplib.py: return encode_base64(s.encode('ascii'), eol='') | |
./smtplib.py: "%s %s" % (AUTH_LOGIN, encode_base64(user.encode('ascii'), eol=''))) | |
./smtplib.py: (code, resp) = self.docmd(encode_base64(password.encode('ascii'), eol='')) | |
./smtplib.py: msg = _fix_eols(msg).encode('ascii') | |
./base64.py: return s.encode('ascii') | |
./poplib.py: lst = line.decode('ascii').split() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment