PATH: //usr/lib/python3.9/site-packages/dns
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📁 __pycache__/
X
📄 _asyncbackend.py
↓
X
📄 _asyncio_backend.py
↓
X
📄 _ddr.py
↓
X
📄 _features.py
↓
X
📄 _immutable_ctx.py
↓
X
📄 asyncbackend.py
↓
X
📄 asyncquery.py
↓
X
📄 asyncresolver.py
↓
X
📄 dnssec.py
↓
X
📁 dnssecalgs/
X
📄 dnssectypes.py
↓
X
📄 e164.py
↓
X
📄 edns.py
↓
X
📄 entropy.py
↓
X
📄 enum.py
↓
X
📄 exception.py
↓
X
📄 flags.py
↓
X
📄 grange.py
↓
X
📄 immutable.py
↓
X
📄 inet.py
↓
X
📄 ipv4.py
↓
X
📄 ipv6.py
↓
X
📄 message.py
↓
X
📄 name.py
↓
X
📄 namedict.py
↓
X
📄 nameserver.py
↓
X
📄 node.py
↓
X
📄 opcode.py
↓
X
📄 query.py
↓
X
📁 quic/
X
📄 rcode.py
↓
X
📄 rdata.py
↓
X
📄 rdataclass.py
↓
X
📄 rdataset.py
↓
X
📄 rdatatype.py
↓
X
📁 rdtypes/
X
📄 renderer.py
↓
X
📄 resolver.py
↓
X
📄 reversename.py
↓
X
📄 rrset.py
↓
X
📄 serial.py
↓
X
📄 set.py
↓
X
📄 tokenizer.py
↓
X
📄 transaction.py
↓
X
📄 tsig.py
↓
X
📄 tsigkeyring.py
↓
X
📄 ttl.py
↓
X
📄 update.py
↓
X
📄 version.py
↓
X
📄 versioned.py
↓
X
📄 win32util.py
↓
X
📄 wire.py
↓
X
📄 xfr.py
↓
X
📄 zone.py
↓
X
📄 zonefile.py
↓
X
📄 zonetypes.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: immutable.py
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license import collections.abc from typing import Any, Callable from dns._immutable_ctx import immutable @immutable class Dict(collections.abc.Mapping): # lgtm[py/missing-equals] def __init__( self, dictionary: Any, no_copy: bool = False, map_factory: Callable[[], collections.abc.MutableMapping] = dict, ): """Make an immutable dictionary from the specified dictionary. If *no_copy* is `True`, then *dictionary* will be wrapped instead of copied. Only set this if you are sure there will be no external references to the dictionary. """ if no_copy and isinstance(dictionary, collections.abc.MutableMapping): self._odict = dictionary else: self._odict = map_factory() self._odict.update(dictionary) self._hash = None def __getitem__(self, key): return self._odict.__getitem__(key) def __hash__(self): # pylint: disable=invalid-hash-returned if self._hash is None: h = 0 for key in sorted(self._odict.keys()): h ^= hash(key) object.__setattr__(self, "_hash", h) # this does return an int, but pylint doesn't figure that out return self._hash def __len__(self): return len(self._odict) def __iter__(self): return iter(self._odict) def constify(o: Any) -> Any: """ Convert mutable types to immutable types. """ if isinstance(o, bytearray): return bytes(o) if isinstance(o, tuple): try: hash(o) return o except Exception: return tuple(constify(elt) for elt in o) if isinstance(o, list): return tuple(constify(elt) for elt in o) if isinstance(o, dict): cdict = dict() for k, v in o.items(): cdict[k] = constify(v) return Dict(cdict, True) return o
SIMPAN PERUBAHAN