GRAYBYTE WORDPRESS FILE MANAGER3933

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib/python3.6/site-packages/pip/_vendor/html5lib/_trie/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib/python3.6/site-packages/pip/_vendor/html5lib/_trie//_base.py
from __future__ import absolute_import, division, unicode_literals

from collections import Mapping


class Trie(Mapping):
    """Abstract base class for tries"""

    def keys(self, prefix=None):
        # pylint:disable=arguments-differ
        keys = super(Trie, self).keys()

        if prefix is None:
            return set(keys)

        # Python 2.6: no set comprehensions
        return set([x for x in keys if x.startswith(prefix)])

    def has_keys_with_prefix(self, prefix):
        for key in self.keys():
            if key.startswith(prefix):
                return True

        return False

    def longest_prefix(self, prefix):
        if prefix in self:
            return prefix

        for i in range(1, len(prefix) + 1):
            if prefix[:-i] in self:
                return prefix[:-i]

        raise KeyError(prefix)

    def longest_prefix_item(self, prefix):
        lprefix = self.longest_prefix(prefix)
        return (lprefix, self[lprefix])

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 15 2024 08:33:27
root / root
0755
__pycache__
--
June 15 2024 08:33:27
root / root
0755
__init__.py
0.282 KB
April 06 2024 13:40:45
root / root
0644
_base.py
0.956 KB
April 06 2024 13:40:45
root / root
0644
datrie.py
1.15 KB
April 06 2024 13:40:45
root / root
0644
py.py
1.733 KB
April 06 2024 13:40:45
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF