2013-05-04から1日間の記事一覧
template methodパターンが継承を使ってオブジェクトのふるまいに多様性をもたらすのに対して、Strategyパターンは移譲を使います。 # coding=utf-8 class Report(object): def __init__(self, formatter, title, *text): self.formatter = formatter self.t…
template methodパターンが継承を使ってオブジェクトのふるまいに多様性をもたらすのに対して、Strategyパターンは移譲を使います。 # coding=utf-8 class Report(object): def __init__(self, formatter, title, *text): self.formatter = formatter self.t…