{ "info": { "author": "invlpg", "author_email": "invlpg@gmail.com", "bugtrack_url": null, "classifiers": [], "description": ".. include globals.rst\n\nIntro\n========\n\n`newsuper` provides you Python 3.x super() in 2.x\n\nWhy\n=======\n\nyou must hate to write code like this::\n\n super(Foo, self).__init__()\n \nand you might have written (WRONG) code like this::\n\n super(self.__class__, self).__init__()\n \nPython 3.x's super() saves your ass::\n\n super().__init__()\n\nYOU WANT IT IN 2.X!\n\nExample\n=======\n\nSimply make your topest-level class inherited from `newsuper.Object` ::\n\n from newsuper import Object\n\n class Foo(Object):\n def __init__(self):\n self.foo = 1\n\n @classmethod\n def do_something_with_class(cls):\n return [cls, 'Foo']\n\n @staticmethod\n def do_something_static():\n return ['Foo']\n \n class Bar(Foo):\n def __init__(self):\n super().__init__()\n self.bar = 1\n\n @classmethod\n def do_something_static(cls):\n return super().do_something_static() + ['Bar']\n\n class Baz(Bar):\n def __init__(self):\n super().__init__()\n self.baz = 1\n\n @classmethod\n def do_something_with_class(cls):\n # Compatible with old super(Baz, cls)\n return super(Baz, cls).do_something_with_class() + ['Baz']\n\n @staticmethod\n def do_something_static():\n # Yes, you can even super a staticmethod!\n return super().do_something_static() + ['Baz']\n \n if __name__ == '__main__':\n assert Baz().foo == Baz().bar == Baz().baz == 1\n assert Baz.do_something_with_class() == [Baz, 'Foo', 'Baz']\n assert Baz.do_something_static() == ['Foo', 'Bar', 'Baz']\n\nproperty is supported too.\n\nInstall\n==========\n\nTry it now!\n\nUse pip::\n\n pip install newsuper\n \nor easy_install::\n\n easy_install newsuper\n \nalso, there is windows installer.", "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/newsuper/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "newsuper", "package_url": "https://pypi.org/project/newsuper/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/newsuper/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/newsuper/" }, "release_url": "https://pypi.org/project/newsuper/0.3c/", "requires_dist": null, "requires_python": null, "summary": "Python 3.x super() in 2.x", "version": "0.3c" }, "last_serial": 795342, "releases": { "0.1b": [ { "comment_text": "", "digests": { "md5": "4f623fb1d13fbf6be3458dd9b7505c7b", "sha256": "9fdd3f00817349c623775e8f1c8528e8378aa72e60fbf867c0ac2d6e1d270c44" }, "downloads": -1, "filename": "newsuper-0.1b.win32.exe", "has_sig": false, "md5_digest": "4f623fb1d13fbf6be3458dd9b7505c7b", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 201339, "upload_time": "2012-01-06T06:58:31", "url": "https://files.pythonhosted.org/packages/f6/f9/4f1b2bdb1154e4450e9322cf8e36d1ac474586f2913db3c2b061eff7ef7b/newsuper-0.1b.win32.exe" }, { "comment_text": "", "digests": { "md5": "4304ca213e026e59f93da622dcd33a2d", "sha256": "9d320877d2aded9a21077189ea4b651d40ba1c0c2883e737583639d61cf29cd1" }, "downloads": -1, "filename": "newsuper-0.1b.zip", "has_sig": false, "md5_digest": "4304ca213e026e59f93da622dcd33a2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5276, "upload_time": "2012-01-06T06:58:28", "url": "https://files.pythonhosted.org/packages/23/97/2d139aee10b1cf682906b8db5a7dd3492ec9ecb8c71de0a6b48615e7bdc4/newsuper-0.1b.zip" } ], "0.2a": [ { "comment_text": "", "digests": { "md5": "cf8495962e4b884442f0a09764654c64", "sha256": "38c8d50dc4d5799bbdb0047ba142f846115aaf4dfd6f8fb60ff8804a5d6a35c6" }, "downloads": -1, "filename": "newsuper-0.2a.win32.exe", "has_sig": false, "md5_digest": "cf8495962e4b884442f0a09764654c64", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 202669, "upload_time": "2012-01-06T12:26:51", "url": "https://files.pythonhosted.org/packages/12/45/4e7d47528da3099036911545ab3caf4bf2b929ca1e2fd95b12955fe0a990/newsuper-0.2a.win32.exe" }, { "comment_text": "", "digests": { "md5": "94a26eab0e429349a1830b1e00afeea6", "sha256": "56aa21c1959c34a071d0f4634b272e415a189d056c12f79063809e122fa28c1e" }, "downloads": -1, "filename": "newsuper-0.2a.zip", "has_sig": false, "md5_digest": "94a26eab0e429349a1830b1e00afeea6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6534, "upload_time": "2012-01-06T12:26:48", "url": "https://files.pythonhosted.org/packages/b1/2d/acbb3cc45612ac063c04e14a998184c0591d6b8557434388a47989e30f43/newsuper-0.2a.zip" } ], "0.3a": [ { "comment_text": "", "digests": { "md5": "3961265c80e5d6fb56b30378ba4c2fb2", "sha256": "de0af91f47c9d76057de91d6c217b72fcd0dbff6ef532ed0ac76191eccf5dc73" }, "downloads": -1, "filename": "newsuper-0.3a.win32.exe", "has_sig": false, "md5_digest": "3961265c80e5d6fb56b30378ba4c2fb2", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 201639, "upload_time": "2012-01-06T16:04:20", "url": "https://files.pythonhosted.org/packages/90/4b/d6edd5cafb71cf70f7215e3f88a159de397a899f1414e8c2cabffcee5bfe/newsuper-0.3a.win32.exe" }, { "comment_text": "", "digests": { "md5": "686e40253c7c65f8c9c87965b8f40d23", "sha256": "de9a7a7a2a05ab84418fcf313008c4cb3dd5217a7a645caeea6d07d4138e687b" }, "downloads": -1, "filename": "newsuper-0.3a.zip", "has_sig": false, "md5_digest": "686e40253c7c65f8c9c87965b8f40d23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5271, "upload_time": "2012-01-06T16:04:16", "url": "https://files.pythonhosted.org/packages/da/57/ec195b525284761ef5b4840950bdb016fa0d8825c00dd0e7e88c541f72da/newsuper-0.3a.zip" } ], "0.3b": [ { "comment_text": "", "digests": { "md5": "1a893a363871548ab7fc432660568238", "sha256": "8c2eeb88dff1fed33c169f7868f403db51f712272133a112d00625deceb3a49d" }, "downloads": -1, "filename": "newsuper-0.3b.win32.exe", "has_sig": false, "md5_digest": "1a893a363871548ab7fc432660568238", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 201579, "upload_time": "2012-01-06T16:44:52", "url": "https://files.pythonhosted.org/packages/01/22/d8c45f977808f16db0e318a23ab7840f05f6f639c16b76989531295b68b6/newsuper-0.3b.win32.exe" }, { "comment_text": "", "digests": { "md5": "469242ec2fa58a5ce9c93db19d43529f", "sha256": "2b03224d324ff13a3e78a78672adb1eee512ff106b33090ea1130d13ba724f9e" }, "downloads": -1, "filename": "newsuper-0.3b.zip", "has_sig": false, "md5_digest": "469242ec2fa58a5ce9c93db19d43529f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5214, "upload_time": "2012-01-06T16:44:48", "url": "https://files.pythonhosted.org/packages/fe/b2/c65495945feb74e3667f20e770a79639d36a13d7ba527446f4bc49f6e69c/newsuper-0.3b.zip" } ], "0.3c": [ { "comment_text": "", "digests": { "md5": "13a3bce8f94bd2082db42daeaf6a0891", "sha256": "47767103c262abcf7a5e64a5aed44eec3eebd0cf195aff2d474a9124c6bdc0d1" }, "downloads": -1, "filename": "newsuper-0.3c.win32.exe", "has_sig": false, "md5_digest": "13a3bce8f94bd2082db42daeaf6a0891", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 201615, "upload_time": "2012-01-07T07:01:12", "url": "https://files.pythonhosted.org/packages/ce/43/29a5d6ef9716d7e27d750a940ff8a19c75c2fa1a54bb77458d058056bb13/newsuper-0.3c.win32.exe" }, { "comment_text": "", "digests": { "md5": "b2dbd52e4f06a0bef765a1a4a45ea288", "sha256": "6f57979d191a52b64c9c50ab608959c010e7b6539c4bcf31b9393ad3d1daf6da" }, "downloads": -1, "filename": "newsuper-0.3c.zip", "has_sig": false, "md5_digest": "b2dbd52e4f06a0bef765a1a4a45ea288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5266, "upload_time": "2012-01-07T07:01:09", "url": "https://files.pythonhosted.org/packages/dd/61/0fd19538b105a40fe6c55739958f286fbfb778d54134cea44892d0fb00c4/newsuper-0.3c.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "13a3bce8f94bd2082db42daeaf6a0891", "sha256": "47767103c262abcf7a5e64a5aed44eec3eebd0cf195aff2d474a9124c6bdc0d1" }, "downloads": -1, "filename": "newsuper-0.3c.win32.exe", "has_sig": false, "md5_digest": "13a3bce8f94bd2082db42daeaf6a0891", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 201615, "upload_time": "2012-01-07T07:01:12", "url": "https://files.pythonhosted.org/packages/ce/43/29a5d6ef9716d7e27d750a940ff8a19c75c2fa1a54bb77458d058056bb13/newsuper-0.3c.win32.exe" }, { "comment_text": "", "digests": { "md5": "b2dbd52e4f06a0bef765a1a4a45ea288", "sha256": "6f57979d191a52b64c9c50ab608959c010e7b6539c4bcf31b9393ad3d1daf6da" }, "downloads": -1, "filename": "newsuper-0.3c.zip", "has_sig": false, "md5_digest": "b2dbd52e4f06a0bef765a1a4a45ea288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5266, "upload_time": "2012-01-07T07:01:09", "url": "https://files.pythonhosted.org/packages/dd/61/0fd19538b105a40fe6c55739958f286fbfb778d54134cea44892d0fb00c4/newsuper-0.3c.zip" } ] }