Dyndesign: Merging Classes Dynamically
summary
A Python package called dyndesign provides a runtime class merger and cross-class invocation system (modules include class_merger and cross-class invocation), tested on Python 3.8–3.11 and installable via pip with source on GitHub. It dynamically imports class modules by dotted path, merges classes so rightmost attributes override, calls all __init__s with filtered args, and supports dynamic decorators and an invoke_all mode. Demo builds a Collatz sequence tool, adds a ternary variant that peaks ~9,000 for 27, and the merged builder works as shown.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 0:23Motivation
- 2:05InDesign approach
- 2:56Why not merge classes
- 4:40LineDesign
- 5:36Status
- 6:09Sequences
- 7:11Python Script
- 7:53Python Code
- 9:33Color Split Example
- 10:05Add Another Option
- 11:29Lets Dance Custom
- 12:12Lets February
- 15:27Merging Classes
- 24:28Summary
- 25:05Links
- 25:21Question
- 27:34Safe method invocation
related talks
29mMetaprogramming with Decorators, Metaclasses, and Dynamic Code Generation
57mThe Art of Subclassing
26mEverything you need to know but were afraid to ask about Data Classes
30mMetaclasses Demystified
45mDataclasses: The code generator to end all code generators
47mA Deep-Dive Into Python Classes
30mThe Wizardry of Metaprogramming
01h 10mIt's Pythons All The Way Down: Python Types & Metaclasses Made Simple
