doubly-py-linked-list


Namedoubly-py-linked-list JSON
Version 1.1.1 PyPI version JSON
download
home_page
SummaryDoubly linked list implementation in Python
upload_time2024-02-26 09:47:21
maintainer
docs_urlNone
author
requires_python>=3.8
licenseBSD 3-Clause License Copyright (c) 2024, Konstantin (Konze) Lübeck All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords data structures
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Doubly (Py) Linked List 1️⃣ ↔️ 2️⃣ ↔️ 3️⃣

[![CI](https://github.com/k0nze/mesi_cachesim/actions/workflows/ci.yml/badge.svg)](https://github.com/k0nze/doubly_py_linked_list/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

A module that implements doubly linked lists in python

## Example

```
python -m pip install doubly-py-linked-list
```

```python
>>> from doubly_py_linked_list import DoublyLinkedList as dll
>>> d = dll([1, 2, 3, 4])
>>> d
1 <-> 2 <-> 3 <-> 4
>>> node_0 = d.insert_head(0)
>>> node_5 = d.insert_tail(5)
>>> for v in d:
...     print(v)
...
0
1
2
3
4
5
>>> d.move_to_head(node_5)
>>> d.move_to_tail(node_0)
>>> list(d)
[5, 1, 2, 3, 4, 0]
>>> d.pop_head()
5
>>> list(d)
[1, 2, 3, 4, 5, 0]
>>> d.pop_tail()
0
>>> list(d)
[1, 2, 3, 4]
>>> d.nodes(d)
[ddl_node(1), ddl_node(2), ddl_node(3), ddl_node(4)]
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "doubly-py-linked-list",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "data structures",
    "author": "",
    "author_email": "\"Konstantin (k0nze) L\u00fcbeck\" <admin@konze.org>",
    "download_url": "https://files.pythonhosted.org/packages/42/49/440b589f9a596dc06661b7d2468068b9db791620440f4c96bd0db29f8a2b/doubly_py_linked_list-1.1.1.tar.gz",
    "platform": null,
    "description": "# Doubly (Py) Linked List 1\ufe0f\u20e3 \u2194\ufe0f 2\ufe0f\u20e3 \u2194\ufe0f 3\ufe0f\u20e3\n\n[![CI](https://github.com/k0nze/mesi_cachesim/actions/workflows/ci.yml/badge.svg)](https://github.com/k0nze/doubly_py_linked_list/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\nA module that implements doubly linked lists in python\n\n## Example\n\n```\npython -m pip install doubly-py-linked-list\n```\n\n```python\n>>> from doubly_py_linked_list import DoublyLinkedList as dll\n>>> d = dll([1, 2, 3, 4])\n>>> d\n1 <-> 2 <-> 3 <-> 4\n>>> node_0 = d.insert_head(0)\n>>> node_5 = d.insert_tail(5)\n>>> for v in d:\n...     print(v)\n...\n0\n1\n2\n3\n4\n5\n>>> d.move_to_head(node_5)\n>>> d.move_to_tail(node_0)\n>>> list(d)\n[5, 1, 2, 3, 4, 0]\n>>> d.pop_head()\n5\n>>> list(d)\n[1, 2, 3, 4, 5, 0]\n>>> d.pop_tail()\n0\n>>> list(d)\n[1, 2, 3, 4]\n>>> d.nodes(d)\n[ddl_node(1), ddl_node(2), ddl_node(3), ddl_node(4)]\n```\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2024, Konstantin (Konze) L\u00fcbeck All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Doubly linked list implementation in Python",
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/k0nze/doubly_py_linked_list"
    },
    "split_keywords": [
        "data",
        "structures"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ef860680bbb0d48485715a243d3e87b1c7c0eb933ee5a84181afaf9a7fd2a01",
                "md5": "4395a0b22cb762431a6aef5def8fe323",
                "sha256": "3e59f9290f332ea69db421d5fc57f15c5105d6f16c384733c95a1cb89c413f4a"
            },
            "downloads": -1,
            "filename": "doubly_py_linked_list-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4395a0b22cb762431a6aef5def8fe323",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5336,
            "upload_time": "2024-02-26T09:47:19",
            "upload_time_iso_8601": "2024-02-26T09:47:19.739877Z",
            "url": "https://files.pythonhosted.org/packages/3e/f8/60680bbb0d48485715a243d3e87b1c7c0eb933ee5a84181afaf9a7fd2a01/doubly_py_linked_list-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4249440b589f9a596dc06661b7d2468068b9db791620440f4c96bd0db29f8a2b",
                "md5": "ca6620ed04fdd97f8f58e13df4a227b0",
                "sha256": "f7ab67a7cb9d4e16ddaa4cd2d146ebda1ca13255f31d6c3cb3a80ebcb1705de5"
            },
            "downloads": -1,
            "filename": "doubly_py_linked_list-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ca6620ed04fdd97f8f58e13df4a227b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5071,
            "upload_time": "2024-02-26T09:47:21",
            "upload_time_iso_8601": "2024-02-26T09:47:21.654718Z",
            "url": "https://files.pythonhosted.org/packages/42/49/440b589f9a596dc06661b7d2468068b9db791620440f4c96bd0db29f8a2b/doubly_py_linked_list-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-26 09:47:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "k0nze",
    "github_project": "doubly_py_linked_list",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "doubly-py-linked-list"
}
        
Elapsed time: 3.95795s