This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/python/yap_kernel/yap_ipython/utils/sentinel.py
Vitor Santos Costa 9c862c21bc jupyter
2018-01-05 16:57:38 +00:00

18 lines
425 B
Python

"""Sentinel class for constants with useful reprs"""
# Copyright (c) yap_ipython Development Team.
# Distributed under the terms of the Modified BSD License.
class Sentinel(object):
def __init__(self, name, module, docstring=None):
self.name = name
self.module = module
if docstring:
self.__doc__ = docstring
def __repr__(self):
return str(self.module)+'.'+self.name