Unauthorized vs. Unauthorized vs. Unauthorized
Which Unauthorized exception should I use in my own code? I see the following three imports in other zope code : from AccessControl import Unauthorized from AccessControl.unauthorized import Unauthorized from zExceptions import Unauthorized What is the difference between these? TIA, -D -- "GUIs normally make it simple to accomplish simple actions and impossible to accomplish complex actions." --Doug Gwyn (22/Jun/91 in comp.unix.wizards) www: http://dman13.dyndns.org/~dman/ jabber: dman@dman13.dyndns.org
* Derrick 'dman' Hudson <dman@dman13.dyndns.org> [2004-07-16 22:49]:
Which Unauthorized exception should I use in my own code? I see the following three imports in other zope code : from AccessControl import Unauthorized from AccessControl.unauthorized import Unauthorized
The above two lines import the same class.
from zExceptions import Unauthorized
AccessControl.Unauthorized extends zExceptions.Unauthorized, so use from AccessControl import Unauthorized -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za
On Sat, Jul 17, 2004 at 09:06:21AM +0200, Roché Compaan wrote: | * Derrick 'dman' Hudson <dman@dman13.dyndns.org> [2004-07-16 22:49]: | > Which Unauthorized exception should I use in my own code? I see the | > following three imports in other zope code : | > from AccessControl import Unauthorized | > from AccessControl.unauthorized import Unauthorized | | The above two lines import the same class. | | > from zExceptions import Unauthorized | | AccessControl.Unauthorized extends zExceptions.Unauthorized, so use | | from AccessControl import Unauthorized Thank you. -D -- He who walks with the wise grows wise, but a companion of fools suffers harm. Proverbs 13:20 www: http://dman13.dyndns.org/~dman/ jabber: dman@dman13.dyndns.org
participants (2)
-
Derrick 'dman' Hudson -
Roché Compaan