• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Writing New Content Objects > Step 3: Writing the Interfaces

Step 3: Writing the Interfaces

The very first step of the coding process is always to define your interfaces, which represent your external API. You should be aware that software that is built on top of your packages expects the interfaces to behave exactly the way you specify them. This is often not too much of an issue for attributes and arguments of a method, but developers often forget to specify what the expected return value of a method or function is or which exceptions it can raise or catch.

Interfaces are commonly stored in an interfaces module or package. Because the messageboard package is not that big, you are going to use a file-based module; therefore, you can start editing a file called interfaces.py in your favorite editor.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint