环境:
测试源代码:
with open('./demo.py') as f:
f.readline()
如果使用Pycharm的Scientific Mode
来查看文档,它将仅显示typing hint
,如下所示:
但是如果使用Ipython
,我可以查看文档:
In[2]: f.readline?
Signature: f.readline(size=-1, /)
Docstring:
Read until newline or EOF.
Returns an empty string if EOF is hit immediately.
Type: builtin_function_or_method