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
from dataclasses import dataclass | |
from time import perf_counter | |
from typing import NamedTuple | |
class Person: | |
def __init__(self, first_name: str, last_name: str, age: int) -> None: | |
self.first_name = first_name | |
self.last_name = last_name | |
self.age = age |
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
import unittest | |
from inspect import isfunction, ismethod | |
def _get_attr(obj, name): | |
"""Bypass object's normal attribute look up with __getattribute__""" | |
return object.__getattribute__(obj, name) | |
class Super: |