Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
16 lines (12 loc) · 489 Bytes

File metadata and controls

16 lines (12 loc) · 489 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Sentinel class for constants with useful reprs"""
from __future__ import annotations
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
class Sentinel:
def __init__(self, name: str, module: str, docstring: str | None = None) -> None:
self.name = name
self.module = module
if docstring:
self.__doc__ = docstring
def __repr__(self) -> str:
return str(self.module) + "." + self.name
Morty Proxy This is a proxified and sanitized view of the page, visit original site.