Skip to content

Instantly share code, notes, and snippets.

View Eclips4's full-sized avatar
:shipit:
Love Python & Rust

Kirill Podoprigora Eclips4

:shipit:
Love Python & Rust
  • Tiraspol
  • 23:38 (UTC +03:00)
View GitHub Profile
@Eclips4
Eclips4 / insane_decorators.py
Created February 14, 2025 11:12
Don't look at it, please.
from types import FunctionType
from typing import Callable
import operator
class Int:
def __init__(self, value: int, operation: Callable[[int], int] | None = None) -> None:
self.value = value
self.operation = operation
def __add__(self, other: "Int") -> "Int":