Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web.
|
2008-06-08 Thinking about Python's inheritance modelI recently read an entry by someone who
was surprised that Python subclasses did not automatically call their
parent class's 'constructor' method, by which he meant The straightforward way to explain Python's inheritance model is that it uses what I could call 'lookup based' or 'name based' subclassing, where what subclassing does is change what binding will be returned when you look up a given name on an instance of the (sub)class. And that's pretty much it as for what subclassing does. (Technically subclassing has some additional effects when you use
The next thing to know is that all of Python's special operations,
including (Note that multiple inheritance does not preclude magic upcalls, since there is a defined method resolution order that the upcalling could follow.) One consequence of this simple model of subclassing is that you can
fake subclassed instances by using other methods
and outside people generally won't notice anything. (They can tell
if they use
Recovering my Eee PC from a post-update problemI recently applied a bunch of pending Eee updates from Asus, and suddenly the full desktop mode that I prefer stopped working. The Eee always booted into the basic interface, and when I switched back to advanced mode everything in my Desktop directory had disappeared (which is bad, because I have some customized launchers there) (Fortunately I had an off-machine backup of my Desktop directory so I could restore my customizations.) I enabled advanced desktop mode the easy way, namely by installing the
(I assume that something in one of the Asus updates overwrote a customization that the advanced desktop stuff required, although I couldn't spot anything obvious. It is a little disturbing to me that something was apparently deleting all additions to my Desktop folder, although I don't know whether this is something in the basic desktop or in the advanced desktop setup stuff.) Sidebar: the launchers I've found usefulBy 'launchers' I mean icons on the desktop that start various
programs when clicked, which are created by (One comment.)
linux/EeeUpdateRecovery written at 01:22:27; Add Comment
|
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |