Hi,<br><br>I'm trying to implement a simple Borg or Singleton pattern for a class that inherits from 'dict'. Can someone point out why this code does not work?<br><br>class MyDict( dict ):<br>   __state = {}<br>
   def __init__(self):<br>      self.__dict__ = self.__state<br><br>a = MyDict()<br>a['one'] = 1<br>a['two'] = 2<br><br>print a<br>print MyDict()<br><br>