File: sentinel.py

package info (click to toggle)
python-pyforge 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 464 kB
  • sloc: python: 3,666; makefile: 12; sh: 7
file content (13 lines) | stat: -rw-r--r-- 402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13

class Sentinel(object):
    def __init__(self, __forge__name=None, **attrs):
        super(Sentinel, self).__init__()
        self.__forge__name = __forge__name
        for attr, value in attrs.items():
            setattr(self, attr, value)
    def __repr__(self):
        name = self.__forge__name
        if name is None:
            name = "0x%x" % id(self)
        return "<Sentinel %s>" % name