<分区>
在每个命令之后,python 打印 refs 计数。我想停止打印引用计数,我该怎么做?
例子:
>>> s = 'Hello World'
[786699 refs]
>>> str(s)
'Hello World'
[786699 refs]
>>>
标签 python python-3.x
<分区>
在每个命令之后,python 打印 refs 计数。我想停止打印引用计数,我该怎么做?
例子:
>>> s = 'Hello World'
[786699 refs]
>>> str(s)
'Hello World'
[786699 refs]
>>>
最佳答案
这不是标准行为:
$ python
Python 3.3.2 (default, May 21 2013, 11:50:47)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Running with pythonstartup.py
>>> s = 'Hello World'
>>> str(s)
'Hello World'
>>>
您可能会得到这个,因为您使用 --with-pydebug
配置了构建,如 this post. 中所述。
关于python - 如何在每个命令后停止 python3 打印引用计数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19200743/