{ "info": { "author": "Phillip J. Eby", "author_email": "peak@eby-sarna.com", "bugtrack_url": null, "classifiers": [], "description": "===============================\n\"Minimum\" and \"Maximum\" Objects\n===============================\n\nThe ``peak.util.extremes`` module provides a production-quality implementation\nof the ``Min`` and ``Max`` objects from PEP 326. While PEP 326 was rejected\nfor inclusion in the language or standard library, the objects described in it\nare useful in a variety of applications. In PEAK, they have been used to\nimplement generic functions (in RuleDispatch and PEAK-Rules), as well as to\nhandle scheduling and time operations in the Trellis. Because this has led to\neach project copying the same code, we've now split the module out so it can\nbe used independently.\n\nSome simple usage examples::\n\n >>> from peak.util.extremes import Min, Max\n >>> import sys\n\n >>> Min < -sys.maxint\n True\n >>> Min < None\n True\n >>> Min < ''\n True\n >>> Max > sys.maxint\n True\n >>> Max > 99999999999999999\n True\n\n >>> type(Min)\n \n\nThe ``Min`` object compares less than any other object but itself, while the\n``Max`` object compares greater than any other object but itself. Both are\ninstances of the ``Extreme`` type.\n\nWhile the original PEP 326 implementation of these extreme values is shorter\nthan the version used here, it contains a flaw: it does not correctly handle\ncomparisons with classic class instances. Therefore, this version defines\nmethods for all six rich comparison operators, to ensure correct support for\nclassic as well as new-style classes::\n\n >>> Max >= Min and Max > Min and Max==Max and Max!=Min\n True\n >>> Max < Min or Max <= Min or Max==Min or Max!=Max\n False\n\n >>> Min <= Max and Min < Max and Min==Min and Min!=Max\n True\n >>> Min > Max or Min >= Max or Min==Max or Min!=Min\n False\n\n >>> class X:\n ... \"\"\"Ensure rich comparisons work correctly with classic classes\"\"\"\n\n >>> x = X()\n\n >>> Min>> Min>x or x>Max or x<=Min or x>=Max or x==Min or Min==x\n False", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/Extremes", "keywords": null, "license": "PSF or ZPL", "maintainer": null, "maintainer_email": null, "name": "Extremes", "package_url": "https://pypi.org/project/Extremes/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Extremes/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/Extremes" }, "release_url": "https://pypi.org/project/Extremes/1.1.1/", "requires_dist": null, "requires_python": null, "summary": "Production-quality 'Min' and 'Max' objects (adapted from PEP 326)", "version": "1.1.1" }, "last_serial": 784223, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "b095353a977d4ba6831c601e6b919b61", "sha256": "e9e8b30310afe06442306f31b65ddc78ea22ec2d31d056e7183efcbfdab9bb0b" }, "downloads": -1, "filename": "Extremes-1.1-py2.3.egg", "has_sig": false, "md5_digest": "b095353a977d4ba6831c601e6b919b61", "packagetype": "bdist_egg", "python_version": "2.3", "requires_python": null, "size": 12945, "upload_time": "2007-11-21T19:51:48", "url": "https://files.pythonhosted.org/packages/ee/eb/b6a21cee9d3562f6cce9fe9d401ef9a93e367375c92fd9da71b19897f9af/Extremes-1.1-py2.3.egg" }, { "comment_text": "", "digests": { "md5": "bd27cd0b245ea9a136fcf354a17294b4", "sha256": "b1bdcfb3fddf665d426c1c22014bf7eae724d4f243d0c63c70ef62f744692759" }, "downloads": -1, "filename": "Extremes-1.1-py2.4.egg", "has_sig": false, "md5_digest": "bd27cd0b245ea9a136fcf354a17294b4", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 5913, "upload_time": "2007-11-21T19:52:01", "url": "https://files.pythonhosted.org/packages/9a/ae/997dad72f01e4f5afd031ed92bf9db2c6dc96a654cdea9a62a02ec6b4d00/Extremes-1.1-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "4015e2546295858558cca16faca5f34f", "sha256": "83e1f5fe4926457e2f53231eeb616fa819338d80b790e41703716af6c6a4cac1" }, "downloads": -1, "filename": "Extremes-1.1-py2.5.egg", "has_sig": false, "md5_digest": "4015e2546295858558cca16faca5f34f", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 5935, "upload_time": "2007-11-21T19:52:06", "url": "https://files.pythonhosted.org/packages/70/34/6917f1e831910d539a1e81e0e1b417fbbadb9f52ae1c961bea3aecc5a452/Extremes-1.1-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "34fc2c114b09e2cc331482d6cc4e4399", "sha256": "5fb1b1b237cb166ea29419a148ce7ab70e604dfe8c78fbec9899439c75be996f" }, "downloads": -1, "filename": "Extremes-1.1.zip", "has_sig": false, "md5_digest": "34fc2c114b09e2cc331482d6cc4e4399", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6134, "upload_time": "2007-11-21T19:51:48", "url": "https://files.pythonhosted.org/packages/ee/62/125b1cb0af1324c060ffb24efbd94fe95a73c86603ae04466bfc8121fb26/Extremes-1.1.zip" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "744c685f3ab2b94819fa34e41ca7e268", "sha256": "e92564d2535929a18c51b75c8904e13ab5e78a6d75fee8c70d04e09812fc8545" }, "downloads": -1, "filename": "Extremes-1.1.1.zip", "has_sig": false, "md5_digest": "744c685f3ab2b94819fa34e41ca7e268", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10360, "upload_time": "2009-02-05T17:13:53", "url": "https://files.pythonhosted.org/packages/0a/3d/30e8301e1b45d2663014d431dbf984df957c140a3f1a862f855b125638ae/Extremes-1.1.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "744c685f3ab2b94819fa34e41ca7e268", "sha256": "e92564d2535929a18c51b75c8904e13ab5e78a6d75fee8c70d04e09812fc8545" }, "downloads": -1, "filename": "Extremes-1.1.1.zip", "has_sig": false, "md5_digest": "744c685f3ab2b94819fa34e41ca7e268", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10360, "upload_time": "2009-02-05T17:13:53", "url": "https://files.pythonhosted.org/packages/0a/3d/30e8301e1b45d2663014d431dbf984df957c140a3f1a862f855b125638ae/Extremes-1.1.1.zip" } ] }