Going All Meta (Part 1)

Meta note on a meta post:  this is my first Python code post (I think).  Getting the highlighting was trivial:  in WordPress I installed and activated the SyntaxHighlighter Evolved plugin.  And “go!”  This gives you a square bracket tag (shortcode) [[code language=”python] … [/code]]. And a last meta comment, to display shortcodes in a post, you can use an extra set of brackets to enclose the entire WordPress shortcode start and end block like this: [[[code] … [/code]]]. For those keeping track, I had to use double outer brackets (in addition to the brackets on the code tags) in my WordPress text to get that to show up for you. Also, the “Visual” editor borks this badly.

One of the black magic corners of Python is the use of metaclasses.  Since other folks have written extensively on what they are, I’m going to focus on one use (abuse?) of them.  Here are some reference links on classes, metaclasses, and types in python:

And a quick sample of python code. Actual code will come with the next post.

print "hello world"