psychotrip

Интроспекция

May 4th, 2021
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. # Получение интроспекции на функцию. Модуль inspect.
  2. import inspect
  3. def function(x, y = 10)
  4.  return x**2
  5. val = inspect.getfullargspec(function)
  6. val1 = inspect.signature(function)
  7. print(f'{val}')
  8. print(f'signature {val1}')
  9.  
Advertisement
Add Comment
Please, Sign In to add comment