/
ilya.petrash
/
SimplePyScripts
Обзор
Документация
Войти
/
ilya.petrash
/
SimplePyScripts
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
inspect__examples/check_is_empty_function__use__inspect__dis.py
24 строки
691 B
gil9red
Refactoring. Using black code style
26 май 2023, 15:52
26 май 2023, 15:52
5d7835d
Код
Авторство
О чём код?
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "ipetrash" from dis__bytecode__is_empty_function import check_is_empty_function as check_is_empty_function__use_dis from inspect__get_source__function import check_is_empty_function as check_is_empty_function__use_inspect def foo(): pass def foo2(): return 1 print("check_is_empty_function__use_inspect:", check_is_empty_function__use_inspect(foo)) print("check_is_empty_function__use_inspect:", check_is_empty_function__use_inspect(foo2)) print() print("check_is_empty_function__use_dis:", check_is_empty_function__use_dis(foo)) print("check_is_empty_function__use_dis:", check_is_empty_function__use_dis(foo2))