{"id":155,"date":"2014-08-05T22:00:45","date_gmt":"2014-08-05T22:00:45","guid":{"rendered":"http:\/\/drsfenner.org\/blog\/?p=155"},"modified":"2014-08-05T22:00:45","modified_gmt":"2014-08-05T22:00:45","slug":"going-all-meta-part-1","status":"publish","type":"post","link":"http:\/\/drsfenner.org\/blog\/2014\/08\/going-all-meta-part-1\/","title":{"rendered":"Going All Meta (Part 1)"},"content":{"rendered":"<p><em>Meta note on a meta post: \u00a0this is my first Python code post (I think). \u00a0Getting the highlighting was trivial: \u00a0in WordPress I installed and activated the <b>SyntaxHighlighter Evolved<\/b> plugin. \u00a0And &#8220;go!&#8221; \u00a0This gives you a square bracket tag (shortcode) [[code language=&#8221;python] &#8230; [\/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] &#8230; [\/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 &#8220;Visual&#8221; editor borks this badly.<\/em><\/p>\n<p>One of the\u00a0<em>black magic<\/em> corners of Python is the use of metaclasses. \u00a0Since other folks have written extensively on what they are, I&#8217;m going to focus on one use (abuse?) of them. \u00a0Here are some reference links on classes, metaclasses, and types in python:<\/p>\n<ul>\n<li>I always enjoy Jake VdP&#8217;s blog entries. \u00a0<a href=\"http:\/\/jakevdp.github.io\/blog\/2012\/12\/01\/a-primer-on-python-metaclasses\/\">Here&#8217;s one that is apropos<\/a>.<\/li>\n<li><a href=\"http:\/\/www.jeffknupp.com\/blog\/2013\/12\/28\/improve-your-python-metaclasses-and-dynamic-classes-with-type\/\">A quick look at the type() built-in<\/a><\/li>\n<li>And, of course, <a href=\"https:\/\/www.python.org\/doc\/newstyle\/\">python.org commentary<\/a>\u00a0and <a href=\"https:\/\/docs.python.org\/2\/reference\/datamodel.html\">docs<\/a><\/li>\n<\/ul>\n<p>And a quick sample of python code.  Actual code will come with the next post.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nprint &quot;hello world&quot;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Meta note on a meta post: \u00a0this is my first Python code post (I think). \u00a0Getting the highlighting was trivial: \u00a0in WordPress I installed and activated the SyntaxHighlighter Evolved plugin. \u00a0And &#8220;go!&#8221; \u00a0This gives you a square bracket tag (shortcode) [[code language=&#8221;python] &#8230; [\/code]]. And a last meta comment, to display shortcodes in a post, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-155","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/posts\/155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/comments?post=155"}],"version-history":[{"count":21,"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/posts\/155\/revisions"}],"predecessor-version":[{"id":177,"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/posts\/155\/revisions\/177"}],"wp:attachment":[{"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/media?parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/categories?post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/tags?post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}