2013-05-20から1日間の記事一覧

テーブル名の変更

初めて使ったのでメモ。 ALTER TABLE old_tablename rename to new_tablename;

pythonのお勉強 classの作成

class keywordで宣言。 __init__は所謂コンストラクタの定義。selfはthisのように自身を指す。self引数は省略不可。 class test: def __init__(self, arg1, arg2): self.name = arg1 self.status = arg2 t = test( "TEST1", 1 ) print t.name