Skip to content

Instantly share code, notes, and snippets.

View arkanister's full-sized avatar

Rafael Souza da Silva arkanister

View GitHub Profile
@palankai
palankai / specification.py
Last active May 7, 2025 11:46
Python Specification Pattern
class Specification:
def __and__(self, other):
return And(self, other)
def __or__(self, other):
return Or(self, other)
def __xor__(self, other):
return Xor(self, other)