{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "mapjoin: the OBSCENE string generation one-liner\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe purpose of the mapjoin function is to have an alternative to str.join that\nlooks more like os.path.join (which takes ``*args``).\n\n``mapjoin()``\n=============\n\n.. code-block:: python\n\n from mapjoin import mapjoin, strjoin\n\n mapjoin('foo', 2) # raise TypeError\n mapjoin('foo', 2, sep='_', key=str) # return 'foo_2'\n\n # you can also make mapjoin use your own callback with the key kwarg:\n your_formatter = lambda key: str(key) if key else 'Nothin!'\n mapjoin('foo', obj, 2, None, sep='\\n', key=your_formatter)\n\n``strjoin()``\n=============\n\n.. code-block:: python\n\n strjoin('foo', 2) # 'foo-2'\n strjoin('foo', 2, sep='_') # 'foo_2'\n\n\nBut ... why ?\n=============\n\nInitially, because I make to many mistakes when I write an os.path.join call and then a\nstr.join call in a row:\n\n.. code-block:: python\n\n >>> os.path.join('a', 'b')\n 'a/b'\n\n # and 2 seconds later i'm doing this:\n\n >>> ' '.join('a', 'b')\n TypeError: join() takes exactly one argument (2 given)\n\n # and instead of \"just fixit and move on\", i decided try to make a joint\n\nBut also because I can't get no satisfaction with my code when it looks like:\n\n.. code-block:: python\n\n readable = ' '.join(map(str, [\n 'hello',\n f'__{name}__',\n something,\n ]))\n\n # or:\n\n def foo():\n readable = textwrap.dedent(f'''\n hello\n __{name}__\n ''').strip()\n\n`Participate to the story\n`_", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://yourlabs.io/oss/mapjoin", "keywords": "automation cli", "license": "", "maintainer": "", "maintainer_email": "", "name": "mapjoin", "package_url": "https://pypi.org/project/mapjoin/", "platform": "", "project_url": "https://pypi.org/project/mapjoin/", "project_urls": { "Homepage": "https://yourlabs.io/oss/mapjoin" }, "release_url": "https://pypi.org/project/mapjoin/0.2.0/", "requires_dist": null, "requires_python": ">=3", "summary": "the OBSCENE string generation one-liner", "version": "0.2.0" }, "last_serial": 4762198, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d8dc24602ef35086f58769b6815780b0", "sha256": "3b9964200d7151727c61f11c28c84a841a59b4e48d740927aabb108ae36e531c" }, "downloads": -1, "filename": "mapjoin-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d8dc24602ef35086f58769b6815780b0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1668, "upload_time": "2019-01-30T15:44:57", "url": "https://files.pythonhosted.org/packages/4d/24/6d1dc5af1e7bd7a4d17337aa4fd671aee9e1ab677d30752c345fc81ac377/mapjoin-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "0d3bda78a4ee94afaa2122b3ad4b33ff", "sha256": "773992a1e7614932baaa19bf5bef59e0d145a1f4bb29b55833a19df8c6cf79c0" }, "downloads": -1, "filename": "mapjoin-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0d3bda78a4ee94afaa2122b3ad4b33ff", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1671, "upload_time": "2019-01-30T15:49:31", "url": "https://files.pythonhosted.org/packages/ac/d8/2214aa4d654d77ef921db9210eead8a6bb8ad532bfa62ff63226300512f7/mapjoin-0.0.2.tar.gz" } ], "0.0.3.dev1": [ { "comment_text": "", "digests": { "md5": "a47ebc2d47dce8a157f6d1079e835637", "sha256": "f5ceb6e7e2271741778faf1c8da2d6df27e0471d32bda099b74588b15e5e389e" }, "downloads": -1, "filename": "mapjoin-0.0.3.dev1.tar.gz", "has_sig": false, "md5_digest": "a47ebc2d47dce8a157f6d1079e835637", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1683, "upload_time": "2019-01-30T15:54:18", "url": "https://files.pythonhosted.org/packages/d5/05/39c608dd771b7446b9d7030790b5dd76626a21439014418e1120fbc7ddee/mapjoin-0.0.3.dev1.tar.gz" } ], "0.1.1.dev1": [ { "comment_text": "", "digests": { "md5": "5062063bfee3849beddca8d8b11713d4", "sha256": "f9ca6a213ea75cb0031d02d75bb4b54bdfcf33d496ceb2c7c1245cfa1f5e0463" }, "downloads": -1, "filename": "mapjoin-0.1.1.dev1.tar.gz", "has_sig": false, "md5_digest": "5062063bfee3849beddca8d8b11713d4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1678, "upload_time": "2019-01-30T15:42:48", "url": "https://files.pythonhosted.org/packages/73/e2/c069573fe03724107ad52a2b7e8df1146ead4d8a4068aa4e83226f0a3115/mapjoin-0.1.1.dev1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3ae5b94b54bc0e19d7851f60bbc33297", "sha256": "e988d24a854fa06564ed5d14faf56f4a96d5d3eb47fab0692651e4f09381690e" }, "downloads": -1, "filename": "mapjoin-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3ae5b94b54bc0e19d7851f60bbc33297", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1747, "upload_time": "2019-01-31T03:34:57", "url": "https://files.pythonhosted.org/packages/fb/9f/d92477e4d230082bc9f57a9f17fd4fb6ed78d4b47c4b74536a1c5d4c4866/mapjoin-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3ae5b94b54bc0e19d7851f60bbc33297", "sha256": "e988d24a854fa06564ed5d14faf56f4a96d5d3eb47fab0692651e4f09381690e" }, "downloads": -1, "filename": "mapjoin-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3ae5b94b54bc0e19d7851f60bbc33297", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 1747, "upload_time": "2019-01-31T03:34:57", "url": "https://files.pythonhosted.org/packages/fb/9f/d92477e4d230082bc9f57a9f17fd4fb6ed78d4b47c4b74536a1c5d4c4866/mapjoin-0.2.0.tar.gz" } ] }