Elektrine lite

← Feed

@calcopiritus@lemmy.world

2026-10-07 05:26 UTC

You can do some kind of RAII in python with the with keyword. Only works for local variables though, where it’s easy to free resources manually

Replies (1)

  • @tias@discuss.tchncs.de 2026-10-07 05:30

    But if you ever forget the with keyword, you have a leak. With proper RAII the resource acquisition and release is a property of the object’s type and impossible to forget.

    Open ##4948585