{ "info": { "author": "Alexander A. Strelets", "author_email": "StreletsAA@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "This package defines two classes:\n\n* `subrange` -- continuous subrange of integers as a ``min..max`` object\n\n* `subrangef` -- annotated `subrange` with reach formatting capabilities\n\nIf you are new to this package, start with the `subrange`. It implements\nthe core features of subranges::\n\n from subrange import subrange\n\n r = subrange(1, 5) # subrange of integers 1..5\n\n print r # 1..5\n print r.min, r.max # 1 5\n print repr(r) # subrange(1, 5)\n print \"{:04b}\".format(r) # 0001..0101\n print 4 in r # True\n print [i for i in r] # [1, 2, 3, 4, 5]\n print r < 6 # True\n\nIf you need annotated subranges with reach formatting, consider using\n`subrangef`::\n\n from subrange import subrangef\n\n f = subrangef(0, 127,\n str_spec=\"0x{value:02X} {id!r}\", # format string\n id=\"ASCII_CHARSET\", # annotation\n brief=\"ASCII character codes\") # annotation\n\n print f # 0x00..7F 'ASCII_CHARSET'\n\n print \"{brief}: {min} to {max}\".format(**f.__dict__)\n # ASCII character codes: 0 to 127\n\nSubrange instances are immutable hashable ordered collections of unique\nintegers in the range from ``min`` to ``max`` inclusively.\n\nAnnotated subranges are initialized with custom set of attributes (those\nare ``id`` and ``brief`` in the example above, but it may be almost\narbitrary set of attributes) and a format string ``str_spec`` that\ndefines the default formatting of the created instance.\n\nMuch more detailed description with examples may be found in\ndocumentation to `subrange` and `subrangef` classes.", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/xoiss/python-subrange", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xoiss/python-subrange", "keywords": "", "license": "Public Domain", "maintainer": "", "maintainer_email": "", "name": "subrange", "package_url": "https://pypi.org/project/subrange/", "platform": "Linux", "project_url": "https://pypi.org/project/subrange/", "project_urls": { "Download": "https://github.com/xoiss/python-subrange", "Homepage": "https://github.com/xoiss/python-subrange" }, "release_url": "https://pypi.org/project/subrange/1.0/", "requires_dist": null, "requires_python": "", "summary": "Subrange data type", "version": "1.0" }, "last_serial": 3867131, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "ffa7ab53f9cb99171a4576e23aae6ba1", "sha256": "fc1ccb405787e2cca132ab1d0c57369e2ddbd19ae0b7df5368758d50f09d4613" }, "downloads": -1, "filename": "subrange-1.0.tar.gz", "has_sig": false, "md5_digest": "ffa7ab53f9cb99171a4576e23aae6ba1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7980, "upload_time": "2018-05-16T03:03:30", "url": "https://files.pythonhosted.org/packages/de/15/2b5262f7e69d1db6e1ed8146eea6ee82042827147f52a39ef2f06b585145/subrange-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ffa7ab53f9cb99171a4576e23aae6ba1", "sha256": "fc1ccb405787e2cca132ab1d0c57369e2ddbd19ae0b7df5368758d50f09d4613" }, "downloads": -1, "filename": "subrange-1.0.tar.gz", "has_sig": false, "md5_digest": "ffa7ab53f9cb99171a4576e23aae6ba1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7980, "upload_time": "2018-05-16T03:03:30", "url": "https://files.pythonhosted.org/packages/de/15/2b5262f7e69d1db6e1ed8146eea6ee82042827147f52a39ef2f06b585145/subrange-1.0.tar.gz" } ] }