banner: @rally-nine.bsky.social
www: https://lethalbit.net/
twitch: http://twitch.tv/akinyanya
mastodon: https://vt.social/@lethalbit
Hi! I'm Aki~
I'm a low-level/systems software and hardware engineer~
I like to joke that i'm a IBM S/360 tsukumogami in the form of the catgirl but that might be more than just a silly joke at this point.
I hope to see you around!
music.youtube.com/watch?v=yJ1h...
music.youtube.com/watch?v=yJ1h...
Wow that was kinda icky... lmao
The downside is that outside of Python 3.14 it's a bit expensive to check, so you 100% don't want this in any hotspots.
I don't think there is a good way to memoize this, but it might be doable, oh well, at least it works!
Wow that was kinda icky... lmao
The downside is that outside of Python 3.14 it's a bit expensive to check, so you 100% don't want this in any hotspots.
I don't think there is a good way to memoize this, but it might be doable, oh well, at least it works!
```py
frame = _getframe(1)
from_gen = frame.f_generator is not None
```
But I'm not sure if there is a way to backport this kinda thing all the way to 3.11 as this is a core interpreter change done in C.
I have found myself in the position where I need to tell if a function in Python is being yielded or not.
basically, I want to have it be /both/ a generator and normal function and dispatch based on how it's invoked.
This is purely for API backwards compatibility, but, mmm, annoying...
```py
frame = _getframe(1)
from_gen = frame.f_generator is not None
```
But I'm not sure if there is a way to backport this kinda thing all the way to 3.11 as this is a core interpreter change done in C.
Con of being tall: ough, my poor back when I have to wash the dishes, ow ow ow
Con of being tall: ough, my poor back when I have to wash the dishes, ow ow ow
I have found myself in the position where I need to tell if a function in Python is being yielded or not.
basically, I want to have it be /both/ a generator and normal function and dispatch based on how it's invoked.
This is purely for API backwards compatibility, but, mmm, annoying...
I have found myself in the position where I need to tell if a function in Python is being yielded or not.
basically, I want to have it be /both/ a generator and normal function and dispatch based on how it's invoked.
This is purely for API backwards compatibility, but, mmm, annoying...
Fuck off, you're not wanted.
I really wish FOSS didn't have /such/ a horrible chud problem, ugh.
Fuck off, you're not wanted.
I really wish FOSS didn't have /such/ a horrible chud problem, ugh.
Red panda girl Im workin on~
Red panda girl Im workin on~