mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.5K
active users

Leonard Ritter

mission impossible: simply getting the actual supertype of a type in python.

what's this piece of python code going to output? no peeking!

@lritter Sorry, I checked out at the misaligned square brackets 🫥

@balint i put them in to irritate specifically you

@lritter I can’t believe you’ve done this

@lritter lets make it worse by combining it with my other favourite footgun pattern

@lritter Since you're asking the question, there has to be a catch - so it's likely not 0 1 2 3 4 5 6 7 8 9, but 9 9 9 9 9 9 9 9 9 9, because the `f()` function captures only the most recent value of `i`. Another level of indirection would solve this.

(No peeking. Yet.)