<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Oct 25, 2009, at 1:50 AM, James Y Knight wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Oct 25, 2009, at 1:38 AM, Glyph Lefkowitz wrote:</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><div>What do you do? &nbsp;Well, the obvious upgrade path here is to make a class which (A) inherits from "Library" to get Twisted functionality and (B) inherits from "object" to get new-style-ness. &nbsp;So you go ahead and write:</div></div><blockquote class="webkit-indent-blockquote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><blockquote class="webkit-indent-blockquote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br></blockquote># in your application<br>class Application(object, Library): pass</blockquote></span></blockquote><br></div><div>Maybe the answer "why not" is obvious and I should already know it, but wouldn't it be more obvious to write:</div><div>class Application(Library, object): pass</div><div>instead. That at least has the advantage of not blowing up if Library later becomes newstyle, right?</div></div></blockquote></div><br><div>Huh. &nbsp;You may have just pointed out that I misunderstand the algorithm used to generate that error. &nbsp;I thought that certain other hierarchies in cases more complex than the trivial one I presented would also give you that error if something became new-style in the middle, but I can't seem to generate any hierarchies that cause a problem. &nbsp;Is it really this simple? &nbsp;Always put 'object' at the *end* of your bases-list to declare the intention "I want to be new-style" and you'll be OK? &nbsp;(If so, why is that?)</div><div><br></div></body></html>