{ "info": { "author": "David N. Mashburn", "author_email": "david.n.mashburn@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "cmpGen is deprecated.\nPlease just use the \"key\" parameter of sort/sorted instead.\nIt is better in every conceivable way (faster, simpler, more legible, etc.)\n\nFor example, here is the example below, but entirely using \"key\" instead:\n\nl=[3,0,1,-2,4,3,-5]\nl.sort(key=abs)\nl now is [0,1,-2,3,3,4,-5]\n\nThis pakage is now here just to support legacy version of packages that used this\n\n\nOld README for reference:\n-------------------------\n\ncmpGen is a very simple utility to aid in sorting.\nBasically, I often want to sort a list based on a specific property\nor more generically a function of the values in the list.\ncmpGen acts as a middle layer to make this process simple.\n\nUsage:\nl is a list\nl.sort(cmpGen(someFunctionThatActsOnListElements))\n\nExample 1: Sort a list of 2-integer pairs based on second element in the pair:\nl=[[3,3],[1,6],[0,12],[1,1],[7,4],[6,7]]\nl.sort(cmpGen(lambda x: x[1]))\nl is now [[1, 1], [3, 3], [7, 4], [1, 6], [6, 7], [0, 12]]\n\nExample 2: Sort based on the absolute value of list elements:\nl=[3,0,1,-2,4,3,-5]\nl.sort(cmpGen(abs))\nl now is [0,1,-2,3,3,4,-5]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/cmpGen/", "keywords": "", "license": "LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "cmpGen", "package_url": "https://pypi.org/project/cmpGen/", "platform": "", "project_url": "https://pypi.org/project/cmpGen/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/cmpGen/" }, "release_url": "https://pypi.org/project/cmpGen/0.2/", "requires_dist": null, "requires_python": "", "summary": "cmpGen is deprecated; it is maintained here for legacy purposes", "version": "0.2" }, "last_serial": 5950893, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "23ce1da475d0c9f0deef430660f72094", "sha256": "9b6aa6a623f053b93d96bb9a5e2b606507a0e71763005d61908163129c845860" }, "downloads": -1, "filename": "cmpGen-0.1.tar.gz", "has_sig": false, "md5_digest": "23ce1da475d0c9f0deef430660f72094", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1210, "upload_time": "2012-08-21T20:07:40", "url": "https://files.pythonhosted.org/packages/08/1e/40ab079907ace2331db3c73bffde598590be6a0e32017a5c9ed385b7ac26/cmpGen-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f54a681dbb38bb3c465ac71aa6cd11db", "sha256": "f41db7877dc8fe6a1014a28a01d72236b2c11a2ce92fcf1a7b4ed19ee298c30e" }, "downloads": -1, "filename": "cmpGen-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f54a681dbb38bb3c465ac71aa6cd11db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1291, "upload_time": "2012-08-21T23:39:55", "url": "https://files.pythonhosted.org/packages/ca/f9/2703f12724f93beba10cb7d57bb529cc6efa3e59ea94ff023e1e2d1dfb09/cmpGen-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "68b6bbb9dc4d8e3cf00760d344c3f134", "sha256": "cdf34d009253633206e0bb0476a9974b751c71dfec3a87abf01d66d1c22d61f0" }, "downloads": -1, "filename": "cmpGen-0.1.2.tar.gz", "has_sig": false, "md5_digest": "68b6bbb9dc4d8e3cf00760d344c3f134", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1601, "upload_time": "2013-04-29T19:19:28", "url": "https://files.pythonhosted.org/packages/69/f3/aee70f5c876ae208af774b229d77932c002cec7700a2b87169d4a5695834/cmpGen-0.1.2.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "3f22a4334bdfc125f04ffdebe93ec395", "sha256": "df6d4a7f15fb13b9e509c69226205aa22b3d63b021ebf072d215fb4bf8533b81" }, "downloads": -1, "filename": "cmpGen-0.2.tar.gz", "has_sig": false, "md5_digest": "3f22a4334bdfc125f04ffdebe93ec395", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18146, "upload_time": "2019-10-09T16:46:57", "url": "https://files.pythonhosted.org/packages/24/79/b678898369767ec7330cf8dace289dcf4ee3efbe87125a1bfe7563978212/cmpGen-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f22a4334bdfc125f04ffdebe93ec395", "sha256": "df6d4a7f15fb13b9e509c69226205aa22b3d63b021ebf072d215fb4bf8533b81" }, "downloads": -1, "filename": "cmpGen-0.2.tar.gz", "has_sig": false, "md5_digest": "3f22a4334bdfc125f04ffdebe93ec395", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18146, "upload_time": "2019-10-09T16:46:57", "url": "https://files.pythonhosted.org/packages/24/79/b678898369767ec7330cf8dace289dcf4ee3efbe87125a1bfe7563978212/cmpGen-0.2.tar.gz" } ] }