4

在每个命令 python 打印 refs 计数之后。我想停止打印引用计数,我该怎么做?

例子:

>>> s = 'Hello World'
[786699 refs]
>>> str(s)
'Hello World'
[786699 refs]
>>> 
4

1 回答 1

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,如本文所述。

于 2013-10-05T17:42:04.793 回答