Cute 'proxy' with __new__
Aahz
aahz at pythoncraft.com
Tue Dec 31 00:13:50 EST 2002
More information about the Python-list mailing list
Tue Dec 31 00:13:50 EST 2002
- Previous message (by thread): Cute 'proxy' with __new__
- Next message (by thread): Cute 'proxy' with __new__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <pan.2002.12.30.21.55.44.730039 at compy.attbi.com>, <jerf at compy.attbi.com> wrote: > > loadedFiles = {} > def __new__(cls, filename, init = None): > try: return cls.loadedFiles[filename] > except: pass You should update your try/except to catch specific exceptions; what happens if the user presses ctrl-C? -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "There are three kinds of lies: Lies, Damn Lies, and Statistics." --Disraeli
- Previous message (by thread): Cute 'proxy' with __new__
- Next message (by thread): Cute 'proxy' with __new__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list