Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    datrie 0.5

    Download button

    No screenshots available
    Downloads: 106  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mikhail Korobov | More programs
    LGPL v3 / FREE
    July 30th, 2012, 15:29 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    datrie description

    Super-fast, efficiently stored Trie for Python

    datrie is a Python module that provides super-fast, efficiently stored Trie for Python (2.x and 3.x). Uses libdatrie.

    Installation

    pip install datrie

    Usage

    Create a new trie capable of storing lower-case ascii letters:

    >>> import string
    >>> import datrie
    >>> trie = datrie.new(string.ascii_lowercase)


    trie variable is a dict-like object that can have unicode keys of certain ranges and integer values.

    In addition to implementing the mapping interface, tries facilitate finding the items for a given prefix, and vice versa, finding the items whose keys are prefixes of a given string. As a common special case, finding the longest-prefix item is also supported.


    Product's homepage

    Requirements:

    · Python

    Limitations:

    · keys must be unicode (no implicit conversion for byte strings under Python 2.x, sorry);
    · values must be integers 0

    What's New in This Release: [ read full changelog ]

    · longest_prefix and longest_prefix_item methods are fixed;
    · datrie is rebuilt with Cython 0.18;
    · misleading benchmark results in README are fixed;
    · State._walk is renamed to State.walk_char.

      


    TAGS:

    Trie storage | Python library | Python | Trie | storage

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM