first commit

This commit is contained in:
Ayxan
2022-05-23 00:16:32 +04:00
commit d660f2a4ca
24786 changed files with 4428337 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
"""
Compatibility layer to allow Pympler being used from different Python versions.
"""
from typing import Any, Iterable
try:
import tkinter
except ImportError:
tkinter = None # type: ignore
# Helper functions
def object_in_list(obj: Any, l: Iterable) -> bool:
"""Returns True if object o is in list.
Required compatibility function to handle WeakSet objects.
"""
for o in l:
if o is obj:
return True
return False