<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How super() in Python3 works and why it&#8217;s retarded</title>
	<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/</link>
	<description>Armin Ronacher thinking</description>
	<pubDate>Sat, 11 Oct 2008 12:08:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>

	<item>
		<title>By: Anthony Tolle</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-5478</link>
		<author>Anthony Tolle</author>
		<pubDate>Wed, 14 May 2008 17:57:12 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-5478</guid>
		<description>I was really surprised that Guido approved this awkward hack, considering his past insistance that Python remain as transparent as possible.

Besides the limitations mentioned by Georg, there's also the problem of calling super() from inner functions, because super() expects the first argument to be self.  I certainly hope the devs document all the idiosyncrasies, because it will certainly bite people not expecting them.

I had posted an alternative based on inserting an extra argument (which could be implemented in only 26 lines of pure Python) in the python-ideas mailing list, but it was rejected outright.  You can find it here: http://thread.gmane.org/gmane.comp.python.ideas/1498

Of course, I'll continue to use Python in the future (like a proper addict), but you won't find me using the new super().</description>
		<content:encoded><![CDATA[<p>I was really surprised that Guido approved this awkward hack, considering his past insistance that Python remain as transparent as possible.</p>
<p>Besides the limitations mentioned by Georg, there&#8217;s also the problem of calling super() from inner functions, because super() expects the first argument to be self.  I certainly hope the devs document all the idiosyncrasies, because it will certainly bite people not expecting them.</p>
<p>I had posted an alternative based on inserting an extra argument (which could be implemented in only 26 lines of pure Python) in the python-ideas mailing list, but it was rejected outright.  You can find it here: <a href="http://thread.gmane.org/gmane.comp.python.ideas/1498" rel="nofollow">http://thread.gmane.org/gmane.comp.python.ideas/1498</a></p>
<p>Of course, I&#8217;ll continue to use Python in the future (like a proper addict), but you won&#8217;t find me using the new super().</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Georg</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4420</link>
		<author>Georg</author>
		<pubDate>Thu, 01 May 2008 19:32:56 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4420</guid>
		<description>@Adam: there's some difference between "works as it should" and "fits into the language". The current solution may look nice to language users who only do basic usage, but to those who know the details it cries out as a kludge.

There are three things that won't work with this argumentless super(), and they are not justifiable from a language designing point of view:

* super() won't work if it has a different name and no other invocation of the literal name "super" is made in the method
* super() won't work if the method has a local called "__class__"
* super() won't work if the method is defined as a normal function and later assigned to the class as a method</description>
		<content:encoded><![CDATA[<p>@Adam: there&#8217;s some difference between &#8220;works as it should&#8221; and &#8220;fits into the language&#8221;. The current solution may look nice to language users who only do basic usage, but to those who know the details it cries out as a kludge.</p>
<p>There are three things that won&#8217;t work with this argumentless super(), and they are not justifiable from a language designing point of view:</p>
<p>* super() won&#8217;t work if it has a different name and no other invocation of the literal name &#8220;super&#8221; is made in the method<br />
* super() won&#8217;t work if the method has a local called &#8220;__class__&#8221;<br />
* super() won&#8217;t work if the method is defined as a normal function and later assigned to the class as a method</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Gomaa</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4391</link>
		<author>Adam Gomaa</author>
		<pubDate>Thu, 01 May 2008 03:33:30 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4391</guid>
		<description>Modify my last comment: the noargs super() is what you don't like; I thought it was the attribute-access super that you didn't like. 

I agree the noargs super() implementation is ugly, but it also works exactly as it should. The attribute-access super, on the other hand, is something I would have found hard to justify. (super().foo==OK, super.foo==not OK)</description>
		<content:encoded><![CDATA[<p>Modify my last comment: the noargs super() is what you don&#8217;t like; I thought it was the attribute-access super that you didn&#8217;t like. </p>
<p>I agree the noargs super() implementation is ugly, but it also works exactly as it should. The attribute-access super, on the other hand, is something I would have found hard to justify. (super().foo==OK, super.foo==not OK)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Gomaa</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4390</link>
		<author>Adam Gomaa</author>
		<pubDate>Thu, 01 May 2008 03:23:08 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4390</guid>
		<description>I was also pretty turned off by the PEP, but never piped up, mostly because the current Py3k doesn't actually implement it like this. Instaed, super now works with zero arguments, which I find fine; it remains just a builtin. 

My impression was that the PEP, even though 'accepted', is not and won't actually become part of Py3k. I think that's for the better, too.</description>
		<content:encoded><![CDATA[<p>I was also pretty turned off by the PEP, but never piped up, mostly because the current Py3k doesn&#8217;t actually implement it like this. Instaed, super now works with zero arguments, which I find fine; it remains just a builtin. </p>
<p>My impression was that the PEP, even though &#8216;accepted&#8217;, is not and won&#8217;t actually become part of Py3k. I think that&#8217;s for the better, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ars</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4388</link>
		<author>Ars</author>
		<pubDate>Thu, 01 May 2008 01:51:30 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4388</guid>
		<description>Not In My Python!</description>
		<content:encoded><![CDATA[<p>Not In My Python!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fneh</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4370</link>
		<author>fneh</author>
		<pubDate>Wed, 30 Apr 2008 14:18:28 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4370</guid>
		<description>Keep in mind that super retains the exact same semantics as before when calling with arguments. Not passing args to super is a convenience feature that will do The Right Thing most of the time. To quote the docs: "You can now invoke super() without arguments and the right class and instance will automatically be chosen. With arguments, its behavior is unchanged."</description>
		<content:encoded><![CDATA[<p>Keep in mind that super retains the exact same semantics as before when calling with arguments. Not passing args to super is a convenience feature that will do The Right Thing most of the time. To quote the docs: &#8220;You can now invoke super() without arguments and the right class and instance will automatically be chosen. With arguments, its behavior is unchanged.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Lee</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4365</link>
		<author>Thomas Lee</author>
		<pubDate>Wed, 30 Apr 2008 13:01:59 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4365</guid>
		<description>Implementing super has proven to be a bit of a tricky problem for Python. I had a brief look at it myself about a year ago, and it did my head in. You're right, though, about there being a lot of magic involved here. You might also be right about it being a little "too magic". I'd have to third the idea of pushing this to python-3000 and/or python-dev for further discussion if you're really keen to make a difference here. :)</description>
		<content:encoded><![CDATA[<p>Implementing super has proven to be a bit of a tricky problem for Python. I had a brief look at it myself about a year ago, and it did my head in. You&#8217;re right, though, about there being a lot of magic involved here. You might also be right about it being a little &#8220;too magic&#8221;. I&#8217;d have to third the idea of pushing this to python-3000 and/or python-dev for further discussion if you&#8217;re really keen to make a difference here. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4363</link>
		<author>Carl</author>
		<pubDate>Wed, 30 Apr 2008 11:55:37 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4363</guid>
		<description>I'm inclined to agree with you, based on your description: "Explicit is better than implicit"!

However, I really think you need to submit these comments to the python-3000 mailing list (python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000) to get their reactions to it. Don't worry about clogging it up. Your post here is well written and on the level of a lot of the other things they discuss there. (Ie. Don't worry about being the guy that says, "Der, why you guys always use whitespace? Try { }s." Your concerns are not the concerns of a troll/newb.)</description>
		<content:encoded><![CDATA[<p>I&#8217;m inclined to agree with you, based on your description: &#8220;Explicit is better than implicit&#8221;!</p>
<p>However, I really think you need to submit these comments to the python-3000 mailing list (python-3000@python.org <a href="http://mail.python.org/mailman/listinfo/python-3000" rel="nofollow">http://mail.python.org/mailman/listinfo/python-3000</a>) to get their reactions to it. Don&#8217;t worry about clogging it up. Your post here is well written and on the level of a lot of the other things they discuss there. (Ie. Don&#8217;t worry about being the guy that says, &#8220;Der, why you guys always use whitespace? Try { }s.&#8221; Your concerns are not the concerns of a troll/newb.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Armin Ronacher</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4360</link>
		<author>Armin Ronacher</author>
		<pubDate>Wed, 30 Apr 2008 11:11:14 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4360</guid>
		<description>I do agree that the python-dev list would be a better place for that to discuss and I'm sure I will bring it up there once I played with it a bit more. I was just confused when I discovered that and hope it brings awareness to this quite radical change.

(And I'm still hoping that this is a feature that is under consideration and not final)</description>
		<content:encoded><![CDATA[<p>I do agree that the python-dev list would be a better place for that to discuss and I&#8217;m sure I will bring it up there once I played with it a bit more. I was just confused when I discovered that and hope it brings awareness to this quite radical change.</p>
<p>(And I&#8217;m still hoping that this is a feature that is under consideration and not final)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Holden</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4359</link>
		<author>Steve Holden</author>
		<pubDate>Wed, 30 Apr 2008 11:05:55 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/30/how-super-in-python3-works-and-why-its-retarded/#comment-4359</guid>
		<description>Or possibly python-3000 would be better, but that's open too.</description>
		<content:encoded><![CDATA[<p>Or possibly python-3000 would be better, but that&#8217;s open too.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
