pythonでimport文で指定したクラスを動的生成したい posted by jun-g at Tue, 03 Apr 2007 02:16 JST ここんとこずーっと悩んでて解決方法がわからんのでブログで晒してみる。 pythonでMochiKit.DOMのcreateDOMみたいのがあったら便利かなと思って下記のようなクラスを書いた。 class Tag: """A base class of HTML tag.""" name = None inline = True container = False def __init__(self, *nodes, **attributes): self.nodes = nodes self.attributes = attributes def __str__(self): return self.serialize() def ser
While coming across the release notes of Javascript 1.7 & 1.8, I noticed Javascript has gained some really Pythonesque features. I'm not saying these features originated from Python, it just happens to be the language I'm most familiar with and the syntax seems strikingly similar to me. Generators Like Python, Javascript acquired the yield statement, turning a function into a generator. function f
MochiKit.Animator 0.9.2 Demos/Testbed MochiKit.Animator is an enhanced*, fully vectorized implementation of Bernard Sumption's animator.js. It eschews the use of classes and instead uses composition to build complex effects in one or two lines of code. The idea is to have everything work "right". This means not having to specify start values, maximum efficiency during playback, and clean, automati
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く