ascii()bin()breakpoint()callable()-Learn English in Python bultins 2018-10-4
def ascii(*args, **kwargs): # real signature unknown
"""
Return an ASCII-only representation of an object.
As repr(), return a string containing a printable representation of an
object, but escape the non-ASCII characters in the string returned by
repr() using \\x, \\u or \\U escapes. This generates a string similar
to that returned by repr() in Python 2.
"""
pass
def bin(*args, **kwargs): # real signature unknown; NOTE: unreliably restored from __doc__
"""
Return the binary representation of an integer.
>>> bin(2796202)
'0b1010101010101010101010'
"""
pass
def breakpoint(*args, **kws): # real signature unknown; restored from __doc__
"""
breakpoint(*args, **kws)
Call sys.breakpointhook(*args, **kws). sys.breakpointhook() must accept
whatever arguments are passed.
By default, this drops you into the pdb debugger.
"""
pass
def callable(i_e_, some_kind_of_function): # real signature unknown; restored from __doc__
"""
Return whether the object is callable (i.e., some kind of function).
Note that classes are callable, as are instances of classes with a
__call__() method.
"""
pass
```
目录(无链接)
1 representation , vote , containing
2 escape
3 unreliable
4 binary
5 breakpoint
6 default
7 drops
8 debugger
9instances
1 representation
[ 英 [,reprɪzen'teɪʃ(ə)n] 美 ['rɛprɪzɛn'teʃən]
n. 代表;表现;表示法;陈述]
{when you have someone to speak,
vote(使投票,选票), or make decisions for you
代理,代表}
<a string containing([kən'tenɪŋ]
包含,容纳,克制,contain) a printable
representation of anobject???>
2 escape
[ 英 [ɪ'skeɪp; e-] 美 [ɪˈskep]
vt. 逃避,避开,避免;被忘掉;被忽视
vi. 逃脱;避开;溜走;(气体,液体等)漏出;(未受伤或只受了一点伤害而)逃脱;声音(不自觉地)由…发出
n. 逃跑;逃亡;逃走;逃跑工具或方法;野生种;泄漏]
{to leave a place when someone is trying to catch you
or stop you, or when there is a dangerous
situation(情况)逃走,逃离}
<escape the non-ASCII characters(字符) in the string
避开字符串中的非ASCII字符,XXX除外 >
3 unreliable
[英 [ʌnrɪ'laɪəb(ə)l] 美 [,ʌnrɪ'laɪəbl]
adj. 不可靠的;靠不住的]
{unable to be trusted(可信的) or depended on(依赖于,取决于)不可信赖的;不可靠的}
<unreliably restored from __doc__ >
4 binary
[ 英 ['baɪnərɪ] 美 ['baɪnəri]
adj. [数] 二进制的;二元的,二态的]
{the binary system
a system of counting, used in computers, in which only the numbers 0 and 1 are used
〔计算机运算系统〕二进制}
<bin()把十进制数转成二进制表示,hex(),oct()>
5 breakpoint
[['breikpɔint]
n. [计] 断点,断裂点]
{ an instruction([ɪn'strʌkʃən] n.
指令,命令;指示;教导;用法说明) inserted by a debug program causing a return to the debug program 断点指令; 调试程序中插入的指令,可使返回调试程序}
<基本没用,用pycharm的debug调试就OK>
6 default
[ 英 [dɪ'fɔːlt; 'diːfɔːlt] 美 [dɪ'fɔlt]
vi. 拖欠;不履行;不到场
n. 违约;缺席;缺乏;系统默认值
vt. 不履行;不参加(比赛等);对…处以缺席裁判]
{by default
if you win a game, competition etc by default, you win it because your opponent( [ə'ponənt]对手) did not play or because there were no other competitors(kəm'pɛtətɚ. 竞争者)
因对手弃权[缺席],因无其他参赛者〔而获胜〕
if something happens by default, it happens because you did not do anything to change it
由于没有采取行动}
<by default 默认时……>
7 drops <=> drop
[ 英 [drɒp] 美 [drɑp]
vt. 滴;使降低;使终止;随口漏出
vi. 下降;终止
n. 滴;落下;空投;微量;滴剂]
{to stop holding(持有,拥有) or carrying something so that it falls
让〔某物〕落下}
<drops you into 让你进入>
8 debugger
[ 英 [diː'bʌgə] 美 [di:'bʌɡə]
n. 调试器;[计] 调试程序]
{Script Debugger 脚本调试程序
Script Debugger 脚本调试器
console debugger 控制台蝶程序
Debugger Users 调试器用户
Remote Debugger 远程调试器
NetConnection Debugger 其还有调试模块
POSTMORTEM DEBUGGER 如何设置验尸调试
debugger compilation 调试程序编译
Wake debugger 唤醒调试器
portable debugger 可携除错器}
<调试>
9instances <=> instance
[ 英 ['ɪnst(ə)ns] 美 ['ɪnstəns]
n. 实例;情况;建议
vt. 举...为例]
{an example of a particular kind of situation
〔特定情况的〕例子,实例}
<实例化--->对象obj>
函数理解
ascii() | repr() 和 eval(),前两个是将对象转成str--->‘[1,2]’|'5'|
'{1:!}' , eval()反过来。
```python
>>> ascii([1,2])
'[1, 2]'
>>> repr([1,2])
'[1, 2]'
>>> eval('1+1')
2
bin()是将十进制转成二进制,oct()十转8 , hex()十转16
>>> bin(10)
'0b1010'
>>> oct(10)
'0o12'
>>> hex(10)
'0xa'
callable():查看是不是可调用,唤醒。返回True说明可以加()调用
>>> callable(5)
False #整数,浮点数不可被调用
>>> callable('5')
False #字符串不可被调用
>>> callable([5])
False #列表不可被调用
>>> callable(print)
True #函数(内置,自定义)可被调用
>>> callable(str)
True #str这是类可以被调用(实例化)