nestedlistops


Namenestedlistops JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/nestedlistops
Summaryeasier access to nested lists
upload_time2023-07-08 07:17:46
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords nested list
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# easier access to nested lists

## pip install nestedlistops 

## Example Usage

```python
    get_nested_item(l: Iterable, i: Iterable) -> Any
        Retrieves a nested item from a given list or nested list based on the provided index sequence.
        
        Args:
            l (Iterable): The initial list or nested list.
            i (Iterable): An iterable representing the index sequence to access the desired item.
        
        Returns:
            Any: The nested item at the specified index sequence.
        
        Examples:
            >>> from nestedlistops import set_nested_item, get_nested_item
            >>> listas = [[[1, 2], [3, 4]], [[4, 5], [6, 7]], [[7, 8], [9, 9]]]
            >>> get_nested_item(l=listas, i=(0, 1, 0))
            3
    
    
    set_nested_item(l: Iterable, i: Iterable, v: Any)
        Sets the value of a nested item in a given list or nested list based on the provided index sequence.
        
        Args:
            l (Iterable): The initial list or nested list.
            i (Iterable): An iterable representing the index sequence to access the desired item.
            v (Any): The value to be assigned to the nested item.
        
        Returns:
                None (the original iterable is modified)
        
        Examples:
            >>> from nestedlistops import set_nested_item, get_nested_item
            >>> listas = [[[1, 2], [3, 4]], [[4, 5], [6, 7]], [[7, 8], [9, 9]]]
            >>> set_nested_item(l=listas, i=(0, 1, 0), v=1111)
            >>> print(listas)
            [[[1, 2], [1111, 4]], [[4, 5], [6, 7]], [[7, 8], [9, 9]]]
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/nestedlistops",
    "name": "nestedlistops",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "nested,list",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8a/fc/b3af0f13f2ac91a719067106bfdfe055b2c6c830c51f2e6b400e297997aa/nestedlistops-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# easier access to nested lists\r\n\r\n## pip install nestedlistops \r\n\r\n## Example Usage\r\n\r\n```python\r\n    get_nested_item(l: Iterable, i: Iterable) -> Any\r\n        Retrieves a nested item from a given list or nested list based on the provided index sequence.\r\n        \r\n        Args:\r\n            l (Iterable): The initial list or nested list.\r\n            i (Iterable): An iterable representing the index sequence to access the desired item.\r\n        \r\n        Returns:\r\n            Any: The nested item at the specified index sequence.\r\n        \r\n        Examples:\r\n            >>> from nestedlistops import set_nested_item, get_nested_item\r\n            >>> listas = [[[1, 2], [3, 4]], [[4, 5], [6, 7]], [[7, 8], [9, 9]]]\r\n            >>> get_nested_item(l=listas, i=(0, 1, 0))\r\n            3\r\n    \r\n    \r\n    set_nested_item(l: Iterable, i: Iterable, v: Any)\r\n        Sets the value of a nested item in a given list or nested list based on the provided index sequence.\r\n        \r\n        Args:\r\n            l (Iterable): The initial list or nested list.\r\n            i (Iterable): An iterable representing the index sequence to access the desired item.\r\n            v (Any): The value to be assigned to the nested item.\r\n        \r\n        Returns:\r\n                None (the original iterable is modified)\r\n        \r\n        Examples:\r\n            >>> from nestedlistops import set_nested_item, get_nested_item\r\n            >>> listas = [[[1, 2], [3, 4]], [[4, 5], [6, 7]], [[7, 8], [9, 9]]]\r\n            >>> set_nested_item(l=listas, i=(0, 1, 0), v=1111)\r\n            >>> print(listas)\r\n            [[[1, 2], [1111, 4]], [[4, 5], [6, 7]], [[7, 8], [9, 9]]]\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "easier access to nested lists",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/nestedlistops"
    },
    "split_keywords": [
        "nested",
        "list"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ea82815f1947b6265266075378eb4a21601571a5e054d168a93db43eaaba13b",
                "md5": "32a9a7babec2a6d1cd9e5c8130ed0fd6",
                "sha256": "9d7f1da34c90410bb99d1a01913311514715340e077f1568c53aa8c4e088d530"
            },
            "downloads": -1,
            "filename": "nestedlistops-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "32a9a7babec2a6d1cd9e5c8130ed0fd6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4268,
            "upload_time": "2023-07-08T07:17:44",
            "upload_time_iso_8601": "2023-07-08T07:17:44.576221Z",
            "url": "https://files.pythonhosted.org/packages/8e/a8/2815f1947b6265266075378eb4a21601571a5e054d168a93db43eaaba13b/nestedlistops-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8afcb3af0f13f2ac91a719067106bfdfe055b2c6c830c51f2e6b400e297997aa",
                "md5": "8a3af16bfba3cff20898b780fbbff19a",
                "sha256": "9aec709846ba6bf75fa83c00c0321828d6b88da45c58a1e475fdc009f190ce6b"
            },
            "downloads": -1,
            "filename": "nestedlistops-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "8a3af16bfba3cff20898b780fbbff19a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3129,
            "upload_time": "2023-07-08T07:17:46",
            "upload_time_iso_8601": "2023-07-08T07:17:46.276026Z",
            "url": "https://files.pythonhosted.org/packages/8a/fc/b3af0f13f2ac91a719067106bfdfe055b2c6c830c51f2e6b400e297997aa/nestedlistops-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-08 07:17:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "nestedlistops",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "nestedlistops"
}
        
Elapsed time: 0.08758s