每个命令后python都会输出refs count。我想停止打印引用计数,我该怎么做?
示例:
>>> s = 'Hello World'
[786699 refs]
>>> str(s)
'Hello World'
[786699 refs]
>>>
答案 0 :(得分:5)
这不是标准行为:
$ 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.