Skip to content

Commit 0a55a8f

Browse files
Update functions_fevzi_bagriacik.py
1 parent cffd174 commit 0a55a8f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Week04/functions_fevzi_bagriacik.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import inspect
2-
31
custom_power = lambda x = 0, /, e = 1 : x ** e
42

53
def custom_equation(x: int = 0, y: int = 0, /, a: int = 1, b: int = 1, *, c: int = 1) -> float:
@@ -19,8 +17,7 @@ def fn_w_counter() -> (int, dict[str, int]):
1917
fn_w_counter.total_count = 0
2018
fn_w_counter.caller_dict = {}
2119

22-
caller_frame = inspect.currentframe().f_back
23-
caller_name = caller_frame.f_globals['__name__']
20+
caller_name = fn_w_counter.__module__
2421

2522
fn_w_counter.total_count += 1
2623

@@ -32,3 +29,5 @@ def fn_w_counter() -> (int, dict[str, int]):
3229
return fn_w_counter.total_count, fn_w_counter.caller_dict
3330

3431

32+
33+

0 commit comments

Comments
 (0)