Login
You're viewing the techdon.dev public feed.
  • Oct 17, 2026, 9:25 PM

    ... and "match Foo(x=1, y=2)" doesn't mean "match what would happen if you called Foo's __init__ with these parameters" but "match an instance of Foo but then getattr 'x' and 'y' from that instance to see if they're equal to 1 and 2", which is wildly unintuitive; and "match Foo(1, 2, 3)" actually requires you to define an attribute of the class/object (__match_args__) that maps index positions to strings that can be getattr'ed... which a huge amount of machinery for little benefit imo

    💬 0🔄 0⭐ 0