Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:08:06+00:00 2026-06-04T18:08:06+00:00

I am getting into the habit of using zope.interface when designing certain classes, which

  • 0

I am getting into the habit of using zope.interface when designing certain classes, which is all well and nice, but I am a bit unsure about exceptions. I haven’t seen any docs talking about them (albeit after cursory searching only). Primarily, I am wondering where to put a certain exception X that is common to any implementation of an interface.

I could always put the exception in its own module. But a whole module for what may be a simple exception? I wouldn’t mind putting it in the same module that defines the interface in question, but I am wondering whether that is considered bad form in some way or another?

Basically I’d like to hear from someone that has used interfaces a bit and knows the conventions for this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:08:08+00:00Added an answer on June 4, 2026 at 6:08 pm

    Best practice is to have a interfaces module, that includes all documented interfaces and corresponding exceptions, constants and events.

    This way, you define the API of your package in one well-defined place, and someone looking up an interface can see that any exceptions being thrown are defined in the same location.

    Here are some example interface.py files from various projects:

    • transaction
    • plone.app.iterate
    • zope.component
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just getting into more client-side stuff in ASP.NET using Javascript, and there's
I'm getting into SDK documentation, but this site has so many eyes and great
I'm getting into using the Repository Pattern for data access with the Entity Framework
I'm just about getting into WCF ; but from what I've read so far,
I am getting into a project which needs some automated review tools. Last week
Lately we've been getting into a bit of co-development, and I don't think I'm
Quickly getting into the code, below is asp.net markup for the accordian which hosts
Without getting into all the javascript for a textfield, I'd like the following validation:
Without getting into all of the gory details, I am trying to design a
Just getting into ajax using MVC3. I am having weird behavior with IE8. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.