[Zope-Checkins] CVS: Zope/lib/python/ComponentArchitecture - Singleton.py:1.1.2.1

Jim Fulton jim@zope.com
Thu, 25 Oct 2001 12:34:46 -0400


Update of /cvs-repository/Zope/lib/python/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv28851/lib/python/ComponentArchitecture

Added Files:
      Tag: ComponentArchitecture-branch
	Singleton.py 
Log Message:
Various changes (in progress) to reflect tutorial.
Checking in to sync with Shane.



=== Added File Zope/lib/python/ComponentArchitecture/Singleton.py ===

import Acquisition

class SingletonBase(Acquisition.Explicit):

    def getContext(self):
        return self.aq_parent

def newSingleton(klass, *args, **kw):
    return klass(*args, **kw).__of__