From: progval <re...@bu...> - 2016-07-30 09:13:22
|
New submission from progval: Hi, I run the following script: import time def fake_time(): return 42 time.time = fake_time print(time.time()) With CPython and Pypy, it print 42. With Jython 2.7.1b3, I get this: Traceback (most recent call last): File "foo.py", line 6, in <module> print(time.time()) TypeError: unbound method fake_time() must be called with time instance as first argument (got nothing instead) ---------- components: Jythonc compiler messages: 10883 nosy: progval severity: normal status: open title: Crash after monkey-patching time.time with an unbound function versions: Jython 2.7 _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue2510> _______________________________________ |