<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>mikeash.com pyblog/friday-qa-2010-11-19-creating-classes-at-runtime-for-fun-and-profit.html comments</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2010-11-19-creating-classes-at-runtime-for-fun-and-profit.html#comments</link><description>mikeash.com Recent Comments</description><lastBuildDate>Mon, 17 Aug 2026 11:48:10 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>mikeash - 2010-11-20 16:27:20</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2010-11-19-creating-classes-at-runtime-for-fun-and-profit.html#comments</link><description>Using &lt;code&gt;self-&amp;gt;isa&lt;/code&gt; to look up the superclass assumes that your class will never be subclassed, which isn't generally a good assumption to make. (KVO can mess with you, if nothing else.) If you're doing this for real, you'd probably want to put the class lookup in exactly one place, then reference that from both the subclass creation function and any methods that need to call through to the superclass implementation.</description><guid isPermaLink="true">17eb6ccce44598e3951cd658bd5a5fef</guid><pubDate>Sat, 20 Nov 2010 16:27:20 GMT</pubDate></item><item><title>dete - 2010-11-20 04:55:26</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2010-11-19-creating-classes-at-runtime-for-fun-and-profit.html#comments</link><description>Seems fragile to hard-code the superclass name like that.  Wouldn't it be better to grab the superclass through self-&amp;gt;isa?</description><guid isPermaLink="true">eef7d47087fbdcb26e445141235ece66</guid><pubDate>Sat, 20 Nov 2010 04:55:26 GMT</pubDate></item><item><title>eddienull - 2010-11-19 18:07:01</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2010-11-19-creating-classes-at-runtime-for-fun-and-profit.html#comments</link><description>well done sir, again.</description><guid isPermaLink="true">0ffff47ce0d98d332812c42caac153da</guid><pubDate>Fri, 19 Nov 2010 18:07:01 GMT</pubDate></item></channel></rss>
