You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
del smth raises WPS420. But sometimes I want to follow the principle saying that explicit is better than implicit to free that var and effectively allow Python to hit it with GC.
In particular, this is useful when working with objects implemented as C-extensions. I just want to inform Python that it's okay to deallocate them as soon as possible.
System information
N/A
The text was updated successfully, but these errors were encountered:
I can say that detecting that it is a C-extension is an overkill for disabling this rule for a single keyword.
Are there any other ways to detect things we can safely use del with?
I can say that detecting that it is a C-extension is an overkill for disabling this rule for a single keyword.
Are there any other ways to detect things we can safely use del with?
Right, I just wanted to share a use-case here. But also, maybe this rule could be relaxed a bit if the target is just a variable name? As in, don't explode on del x but fail on del x[1].
In my opinion it is a good candidate for ignore=
Yeah, I'm thinking about it too.
P.S. Unrelated, but anyway: I am implementing a Future monad to work with async code: dry-python/returns#future-container I would appreciate your opinion on it!
Looks cool. Maybe I'll get to try it out when I'll finally have some time for the octomachinery refactoring...
Bug report
What's wrong / How is that should be
del smth
raises WPS420. But sometimes I want to follow the principle saying that explicit is better than implicit to free that var and effectively allow Python to hit it with GC.In particular, this is useful when working with objects implemented as C-extensions. I just want to inform Python that it's okay to deallocate them as soon as possible.
System information
N/A
The text was updated successfully, but these errors were encountered: