Elektrine lite

← Feed

@aud@spectre.asta.lgbt

2026-11-12 19:09 UTC

@xgranade@wandering.shop @glyph@mastodon.social @SnoopJ@hachyderm.io yeah, I think that's sort of why it's throwing me off (that, and I dislike the `abc` acronym; `abstract base class` does make sense but `collections.abc` is kind of a weird place to go for typing hints) in that it... kinda doesn't fit, there. Otherwise yeah, you're often more interested in *what it can do* and have done to it rather than what specific flavor of container it is, I suppose.  I can see scenarios where you might want to act upon any type that has the properties of a Sequence.  Definitely just easier to think about the specific types I'm throwing in there most of the time though.

Replies (1)

  • @glyph@mastodon.social 2026-11-12 19:11

    @aud@spectre.asta.lgbt @xgranade@wandering.shop @SnoopJ@hachyderm.io I have many feelings (the ABCs stuff in Python is broken in a bunch of ways, the type hints are sometimes worse and have more special cases in the type checkers, the 'abc.register' decorator still doesn't even have type checking support ~10 years in to this project) but they're probably best left in the drafts. The namespace is where it is now, and we're probably better off (slowly) moving towards it rather than yearning for an imagined prelapsarian typing module.

    Open ##5525302