{ "info": { "author": "Michael Foord", "author_email": "michael@voidspace.org.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Python 2.7 & 3.1 include a ``WeakSet`` class, a collection for storing objects\r\nusing weak references \r\n(see the `Python weakref module `_).\r\n\r\nThis project is a backport of the weakrefset module, and tests, for Python 2.5\r\nand 2.6. The tests \r\nrequire the `unittest2 package `_. \r\n\r\n* Mercurial repository & issue tracker: http://code.google.com/p/weakrefset/\r\n\r\nYou can install it with: ``pip install weakrefset``\r\n\r\nUsage is straightforward. You don't need to deal with weak references\r\nthemselves, the WeakSet manages \r\nthe references and you can add / remove / iterate over your objects directly::\r\n\r\n >>> from weakrefset import WeakSet\r\n >>> class Foo(object): pass\r\n ...\r\n >>> f1 = Foo()\r\n >>> f2 = Foo()\r\n >>> refs = WeakSet([f1, f2])\r\n >>> f3 = Foo()\r\n >>> refs.add(f3)\r\n >>> refs.remove(f1)\r\n >>> del f2\r\n >>> f3 in refs\r\n True\r\n >>> for f in refs:\r\n ... print f\r\n ...\r\n <__main__.Foo object at 0x40e410>\r\n\r\nTo be compatible with Python 2.5, 2.6 and future versions of Python you can\r\nimport it like this::\r\n\r\n try:\r\n # location in Python 2.7 and 3.1\r\n from weakref import WeakSet\r\n except ImportError:\r\n # separately installed\r\n from weakrefset import WeakSet", "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/weakrefset", "keywords": "weakref set collection", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "weakrefset", "package_url": "https://pypi.org/project/weakrefset/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/weakrefset/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/weakrefset" }, "release_url": "https://pypi.org/project/weakrefset/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A WeakSet class for storing objects using weak references.", "version": "1.0.0" }, "last_serial": 801570, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "a5d93c85dd296886516528172fc512a4", "sha256": "1199c768153c2f4ac123f2a57e93a28185d843b09864ea3f4219d383d1cc16aa" }, "downloads": -1, "filename": "weakrefset-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a5d93c85dd296886516528172fc512a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2843, "upload_time": "2010-03-30T13:43:40", "url": "https://files.pythonhosted.org/packages/d2/cd/8c62dab782ac0abcacaff31a3c5919eb8cd42b6936ab70b0d8a0a221ec5e/weakrefset-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a5d93c85dd296886516528172fc512a4", "sha256": "1199c768153c2f4ac123f2a57e93a28185d843b09864ea3f4219d383d1cc16aa" }, "downloads": -1, "filename": "weakrefset-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a5d93c85dd296886516528172fc512a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2843, "upload_time": "2010-03-30T13:43:40", "url": "https://files.pythonhosted.org/packages/d2/cd/8c62dab782ac0abcacaff31a3c5919eb8cd42b6936ab70b0d8a0a221ec5e/weakrefset-1.0.0.tar.gz" } ] }