Last active
May 26, 2024 09:51
-
-
Save gkmngrgn/a49daa449f80205062f24617962c8f9d to your computer and use it in GitHub Desktop.
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
class IpAddrKind: | |
V4 = 1 | |
V6 = 2 | |
class IpAddr: | |
def __init__(self, kind: IpAddrKind, address: str) -> None: | |
self.kind = kind | |
self.address = address | |
home = IpAddr( | |
kind=IpAddrKind.V4, | |
address="127.0.0.1", | |
) | |
loopback = IpAddr( | |
kind=IpAddrKind.V6, | |
address="::1", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment