{ "info": { "author": "Jasper Spaans", "author_email": "j@jasper.es", "bugtrack_url": null, "classifiers": [], "description": "nihilo\r\n======\r\n\r\nThis package allows you to do the fantastic import:\r\n\r\n >>> from nihilo import nihil\r\n\r\nThis is a nice object which behaves like None but does accept method calls.\r\nWhy would you want this?\r\n\r\nSo, we have:\r\n\r\n >>> a_dict = { 'who': 'Parmenides' }\r\n >>> print a_dict.get('who')\r\n Parmenides\r\n >>> print a_dict.get('where')\r\n None\r\n\r\nBut you might want to do:\r\n >>> a_dict.get('who').startswith('g')\r\n False\r\n >>> a_dict.get('where').startswith('g')\r\n Traceback (most recent call last):\r\n ...\r\n AttributeError: 'NoneType' object has no attribute 'startswith'\r\n\r\nWith nihil, you can do:\r\n >>> print a_dict.get('where', nihil).startswith('g')\r\n nihil()\r\n\r\nNote that casting to bool returns false, so you can easily test..:\r\n\r\n >>> if a_dict.get('where', nihil).startwith('g'):\r\n ... print \"got it!\"\r\n\r\nnihil is very flexible, it will also allow you to call almost any method\r\nand it will return itself:\r\n\r\n >>> nihil.foo.bar('quux', frop=True)\r\n nihil()\r\n\r\nAnd remember, ex nihilo nihil fit.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jap/nihilo", "keywords": "", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "nihilo", "package_url": "https://pypi.org/project/nihilo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nihilo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jap/nihilo" }, "release_url": "https://pypi.org/project/nihilo/0.1/", "requires_dist": null, "requires_python": null, "summary": "Convenience package offering", "version": "0.1" }, "last_serial": 795422, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b5e6a422cba76248112f76e998c1c0bd", "sha256": "09788971efb425716e8732a468cb015f1d6be263755f076ea8ea7a624070b900" }, "downloads": -1, "filename": "nihilo-0.1.tar.gz", "has_sig": false, "md5_digest": "b5e6a422cba76248112f76e998c1c0bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 652, "upload_time": "2012-10-30T20:50:40", "url": "https://files.pythonhosted.org/packages/88/bc/7e1ecec49a5cb2212b11407cba21fee26b1f34c7510b7dd530811a60b387/nihilo-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b5e6a422cba76248112f76e998c1c0bd", "sha256": "09788971efb425716e8732a468cb015f1d6be263755f076ea8ea7a624070b900" }, "downloads": -1, "filename": "nihilo-0.1.tar.gz", "has_sig": false, "md5_digest": "b5e6a422cba76248112f76e998c1c0bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 652, "upload_time": "2012-10-30T20:50:40", "url": "https://files.pythonhosted.org/packages/88/bc/7e1ecec49a5cb2212b11407cba21fee26b1f34c7510b7dd530811a60b387/nihilo-0.1.tar.gz" } ] }