Hello List,

I would like to make a singleton class in python 2.4.3, I found this
pattern in the web:

class Singleton:
    __single = None
    def __init__( self ):
        if Singleton.__single:
            raise Singleton.__single
        Singleton.__single = self


the line "raise Singleton.__single" invokes in my class the following
error:

exceptions must be classes, instances, or strings (deprecated), not
PurchaseRequisitionController



Greetings, Dennis

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to