エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Python でデザパタ -- シングルトン/Singleton - 牌語備忘録 -pygo
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Python でデザパタ -- シングルトン/Singleton - 牌語備忘録 -pygo
(Python2.7) Singleton pattern 元ネタ シングルトン Ruby 2.0.0 デザインパターン速攻習得[Singleton][... (Python2.7) Singleton pattern 元ネタ シングルトン Ruby 2.0.0 デザインパターン速攻習得[Singleton][Design Pattern] - 酒と泪とRubyとRailsと singleton_module.py class Singleton(object): def __init__(self): self.counter = 0 get_singleton = Singleton() main.py from singleton_module import get_singleton obj1 = get_singleton obj1.counter += 1 print(obj1.counter) #-> 1 obj2 = get_singleton obj2.counter += 1 print(obj2.counter) #-> 2