2008-07-01から1ヶ月間の記事一覧

ゆの with Python compiler package

http://codepad.org/1ZXW52gACPython の内部依存はさすがにどうなのかと思ったのでまじめにかいた>< compiler++

ゆの in CPython

http://codepad.org/cCm3PK4Lhttp://subtech.g.hatena.ne.jp/mayuki/20080713/1215965643 を見て、ごまかすことだけ考えて書きました!!そのうちまともにparseしてAST辿る……かもしれない。

ゆの in Python 3.0

ついでに。 2to3 をしたのと、 __div__ じゃなくて __truediv__ を使う(__future__.division)ように なったっぽいのを置き換えただけ。 class X: def __init__(s, o): s.a = o def __lt__(s, o): print("%s %s" % (s.a, o)) def __str__(s): return "365" de…

ゆの in Python (私版)

http://subtech.g.hatena.ne.jp/cho45/20080708/1215450151 http://mattn.kaoriya.net/software/lang/python/20080708101311.htmRuby 版のトリッキーさが気に入ったので Python でもなんとかならないかとあがいてみた。 class X: def __init__(s, o): s.a = …