adlfkjfadslkjfads

The hierarchy of Mystical Arts in Programming

Posted on Wed 29 February 2012 in Posts • Tagged with perl, python

I was responding to an incredibly detailed answer on StackOverflow on Python metaclasses , when I wrote the following on my whiteboard:

original whiteboard contents

I thought this was clever, and gave the (I thought clever) response on StackOverflow which read:

I read this and think of the famous "There are lies, damned lies …


Continue reading

Python HTMLParser and super()

Posted on Thu 16 February 2012 in Posts • Tagged with python, inheritance

So I have a class that inherits from HTMLParser, and I want to call the super class init (the __init__ of HTMLParser), I would think I should do:

class MyParser(HTMLParser):
    def __init__(self):
        super(MyParser, self).__init__()

But this causes a problem:

myparser = MyParser()

Traceback (most recent call last …

Continue reading