-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
49 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
_PURPLE = "\033[95m" | ||
_RESET = "\033[0m" | ||
|
||
|
||
def print_purple(text: str) -> None: | ||
# The ANSI escape code for purple text is \033[95m | ||
# The \033 is the escape code, and [95m specifies the color (purple) | ||
# Reset code is \033[0m that resets the style to default | ||
print(f"{_PURPLE}{text}{_RESET}") | ||
|
||
|
||
def isinstance2(a, b, typ): | ||
return isinstance(a, typ) and isinstance(b, typ) | ||
|
||
|
||
def issubclass2(a, b, typ): | ||
return issubclass(a, typ) and issubclass(b, typ) |