摘要: 英文文档: locals() Update and return a dictionary representing the current local symbol table. Free variables are returned by locals() when it is called i 阅读全文
posted @ 2016-11-04 21:28 十月狐狸 阅读(1478) 评论(0) 推荐(0) 编辑
摘要: 英文文档: class list([iterable]) Rather than being a function, list is actually a mutable sequence type, as documented in Lists and Sequence Types — list, 阅读全文
posted @ 2016-11-04 20:07 十月狐狸 阅读(1465) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 2. 如果参数为其它类型,则其必须实现__len__方法,并返回整数,否则报错。 阅读全文
posted @ 2016-11-04 19:55 十月狐狸 阅读(2252) 评论(0) 推荐(1) 编辑
摘要: 英文文档: iter(object[, sentinel]) Return an iterator object. The first argument is interpreted very differently depending on the presence of the second a 阅读全文
posted @ 2016-11-03 23:48 十月狐狸 阅读(2069) 评论(2) 推荐(0) 编辑
摘要: 英文文档: 3. 任何一个类都是自己类的子类,即class和calssinfo传入相同类型时,返回True。 4. 如果classinfo类型对象,是多个类型对象组成的元组,如果class类型对象是元组的任一类型对象的子类,则返回True,否则返回False。 5. 如果classinfo类型对象, 阅读全文
posted @ 2016-11-03 23:10 十月狐狸 阅读(1354) 评论(0) 推荐(0) 编辑
摘要: 英文文档: isinstance(object, classinfo) Return true if the object argument is an instance of the classinfo argument, or of a (direct, indirect or virtual) 阅读全文
posted @ 2016-11-03 22:16 十月狐狸 阅读(5554) 评论(0) 推荐(1) 编辑
摘要: 英文文档: class int(x=0) class int(x, base=10) Return an integer object constructed from a number or string x, or return 0 if no arguments are given. If x 阅读全文
posted @ 2016-11-03 22:00 十月狐狸 阅读(5917) 评论(0) 推荐(2) 编辑
摘要: 英文文档: input([prompt]) If the prompt argument is present, it is written to standard output without a trailing newline. The function then reads a line f 阅读全文
posted @ 2016-11-02 13:45 十月狐狸 阅读(2848) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 阅读全文
posted @ 2016-11-01 22:38 十月狐狸 阅读(825) 评论(0) 推荐(0) 编辑
摘要: 英文文档: hex(x) Convert an integer number to a lowercase hexadecimal string prefixed with “0x”, for example If x is not a Python int object, it has to de 阅读全文
posted @ 2016-10-31 12:44 十月狐狸 阅读(2489) 评论(0) 推荐(0) 编辑
摘要: 英文文档: help([object]) Invoke the built-in help system. (This function is intended for interactive use.) If no argument is given, the interactive help s 阅读全文
posted @ 2016-10-30 22:08 十月狐狸 阅读(1804) 评论(0) 推荐(0) 编辑
摘要: 英文文档: hash(object)Return the hash value of the object (if it has one). Hash values are integers. They are used to quickly compare dictionary keys duri 阅读全文
posted @ 2016-10-29 10:35 十月狐狸 阅读(15593) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 2. 函数实际上是调用getattr(object,name)函数,通过是否抛出AttributeError来判断是否含有属性。 阅读全文
posted @ 2016-10-29 10:34 十月狐狸 阅读(2398) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 阅读全文
posted @ 2016-10-29 10:33 十月狐狸 阅读(992) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 2. 函数第三个参数default为可选参数,如果object中含义name属性,则返回name属性的值,如果没有name属性,则返回default值,如果default未传入值,则报错。 阅读全文
posted @ 2016-10-28 22:16 十月狐狸 阅读(8123) 评论(0) 推荐(1) 编辑
摘要: 英文文档: 2. 不传入参数时,生成的空的不可变集合。 阅读全文
posted @ 2016-10-28 22:05 十月狐狸 阅读(2106) 评论(0) 推荐(0) 编辑
摘要: 英文文档: format(value[, format_spec]) Convert a value to a “formatted” representation, as controlled by format_spec. The interpretation of format_spec wi 阅读全文
posted @ 2016-10-27 20:01 十月狐狸 阅读(3500) 评论(3) 推荐(0) 编辑
摘要: 英文文档: class float([x]) Return a floating point number constructed from a number or string x. If the argument is a string, it should contain a decimal 阅读全文
posted @ 2016-10-26 16:40 十月狐狸 阅读(25056) 评论(0) 推荐(0) 编辑
摘要: 英文文档: filter(function, iterable) Construct an iterator from those elements of iterable for which function returns true. iterable may be either a seque 阅读全文
posted @ 2016-10-26 16:13 十月狐狸 阅读(1155) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 2. 第一个参数为语句字符串,globals参数和locals参数为可选参数,如果提供,globals参数必需是字典,locals参数为mapping对象。 3. globals参数用来指定代码执行时可以使用的全局变量以及收集代码执行后的全局变量 4. locals参数用来指定代码执行时 阅读全文
posted @ 2016-10-25 22:16 十月狐狸 阅读(7054) 评论(0) 推荐(1) 编辑