File: describable.py

package info (click to toggle)
subuser 0.6.2-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 4,208 kB
  • sloc: python: 5,201; sh: 380; makefile: 73
file content (18 lines) | stat: -rwxr-xr-x 369 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -*-

"""
If you want to print a description of an object to standard output, make that object describable.
"""

#external imports
import abc
#internal imports
#import ...

class Describable(object):
  __metaclass__ = abc.ABCMeta

  @abc.abstractmethod
  def describe(self):
    """ Print out a human readable description of the object. """
    pass