「文科省のPythonはPythonじゃねぇ」で知ったのですが、Pythonは組み込み関数も上書きできるんですね。
で、調べてみると、builtins.()
で元の組み込み関数も呼び出せると。
ということは、プログラムの先頭あたりにでも
import builtins
def print(str):
builtins.print('UNKO')
More than 3 years have passed since last update.
「文科省のPythonはPythonじゃねぇ」で知ったのですが、Pythonは組み込み関数も上書きできるんですね。
で、調べてみると、builtins.()
で元の組み込み関数も呼び出せると。
ということは、プログラムの先頭あたりにでも
import builtins
def print(str):
builtins.print('UNKO')
Register as a new user and use Qiita more conveniently