{ "info": { "author": "Kenneth Knowles", "author_email": "kenn.knowles@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable" ], "description": "Python \"Either\" and \"Maybe\"\r\n===========================\r\n\r\nhttps://github.com/kennknowles/python-either\r\n\r\nThis library provides two fundamental near-trivial data structures for Python:\r\n\r\n * `Either` also known as \"coproduct\", \"sum type\", \"variant\", \"tagged union\", \"disjoint union\", etc: A value that comes from one of two sets\r\n * `Maybe` also known as \"option\" or \"Either Nothing\": A value that may be missing. (Python has \"None\" but it does not compose)\r\n\r\nEach is ~10 lines, mostly boilerplate, but now they are in one place in a library. \r\n\r\nFurther Reading:\r\n----------------\r\n\r\nIf you are unfamiliar with these concepts, here is some reading from around the web:\r\n\r\nEither:\r\n\r\n * [Tagged union (Wikipedia)](http://en.wikipedia.org/wiki/Tagged_union)\r\n * [Either (Scala)](http://www.scala-lang.org/api/current/scala/Either.html)\r\n * [Boost.Variant (C++)](http://www.boost.org/doc/libs/1_50_0/doc/html/variant.html)\r\n * [Data.Either (Haskell)](http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Either.html)\r\n * [std.variant (D)](http://dlang.org/phobos/std_variant.html)\r\n\r\nMaybe:\r\n\r\n * [Option (Scala)](http://www.scala-lang.org/api/current/scala/Option.html)\r\n * [Maybe (Java)](https://github.com/npryce/maybe-java)\r\n * [Maybe pattern (Python recipe)](http://code.activestate.com/recipes/577248-maybe-pattern/)\r\n * [Data.Maybe (Haskell)](http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Maybe.html)\r\n * [Maybe (Ruby)](https://github.com/bhb/maybe)\r\n\r\n\r\nContributors\r\n------------\r\n\r\n * [Kenn Knowles](https://github.com/kennknowles) ([@kennknowles](https://twitter.com/KennKnowles))\r\n\r\n\r\nCopyright and License\r\n---------------------\r\n\r\nCopyright 2012- Kenneth Knowles\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.", "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/kennknowles/python-either", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "either", "package_url": "https://pypi.org/project/either/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/either/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kennknowles/python-either" }, "release_url": "https://pypi.org/project/either/0.2/", "requires_dist": null, "requires_python": null, "summary": "\"Either\" and \"Maybe\" data structures", "version": "0.2" }, "last_serial": 746908, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b2d2686c7fc1d0375a6980b929f3c18a", "sha256": "a7e724a8704a69dd93167579765b1faf7e1f48b1b5e9dfa543a6bc38c769e0d0" }, "downloads": -1, "filename": "either-0.1.tar.gz", "has_sig": false, "md5_digest": "b2d2686c7fc1d0375a6980b929f3c18a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5459, "upload_time": "2012-08-20T15:51:37", "url": "https://files.pythonhosted.org/packages/2c/c6/9889caebb14126985601900e1f406ca9df470d5c243ebe4adcf6eb46a2bf/either-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "d02b0c10e7e528d9c01426ce418214e7", "sha256": "aa1f52f720152a659daafbb07061c7080aad36b3e42b4068347c016ffc814641" }, "downloads": -1, "filename": "either-0.2.tar.gz", "has_sig": false, "md5_digest": "d02b0c10e7e528d9c01426ce418214e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5463, "upload_time": "2012-08-20T15:53:43", "url": "https://files.pythonhosted.org/packages/3a/6b/566b402a772e3ce9a7b5a51fb9acfc4caa1e4275763b946ff802bc82c587/either-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d02b0c10e7e528d9c01426ce418214e7", "sha256": "aa1f52f720152a659daafbb07061c7080aad36b3e42b4068347c016ffc814641" }, "downloads": -1, "filename": "either-0.2.tar.gz", "has_sig": false, "md5_digest": "d02b0c10e7e528d9c01426ce418214e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5463, "upload_time": "2012-08-20T15:53:43", "url": "https://files.pythonhosted.org/packages/3a/6b/566b402a772e3ce9a7b5a51fb9acfc4caa1e4275763b946ff802bc82c587/either-0.2.tar.gz" } ] }