摘要: 英文文档: max(iterable, *[, key, default]) max(arg1, arg2, *args[, key]) Return the largest item in an iterable or the largest of two or more arguments. I 阅读全文
posted @ 2016-11-06 16:09 十月狐狸 阅读(9809) 评论(1) 推荐(1) 编辑
摘要: 英文文档: 2. 当传入多个可迭代对象时,函数的参数必须提供足够多的参数,保证每个可迭代对象同一索引的值均能正确传入函数。 3. 当传入多个可迭代对象时,且它们元素长度不一致时,生成的迭代器只到最短长度。 4. map函数是一个典型的函数式编程例子。 阅读全文
posted @ 2016-11-05 17:55 十月狐狸 阅读(3511) 评论(4) 推荐(2) 编辑
摘要: 英文文档: 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 十月狐狸 阅读(1489) 评论(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 十月狐狸 阅读(1472) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 2. 如果参数为其它类型,则其必须实现__len__方法,并返回整数,否则报错。 阅读全文
posted @ 2016-11-04 19:55 十月狐狸 阅读(2255) 评论(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 十月狐狸 阅读(2074) 评论(2) 推荐(0) 编辑
摘要: 英文文档: 3. 任何一个类都是自己类的子类,即class和calssinfo传入相同类型时,返回True。 4. 如果classinfo类型对象,是多个类型对象组成的元组,如果class类型对象是元组的任一类型对象的子类,则返回True,否则返回False。 5. 如果classinfo类型对象, 阅读全文
posted @ 2016-11-03 23:10 十月狐狸 阅读(1366) 评论(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 十月狐狸 阅读(5569) 评论(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 十月狐狸 阅读(5920) 评论(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 十月狐狸 阅读(2853) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 阅读全文
posted @ 2016-11-01 22:38 十月狐狸 阅读(830) 评论(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 十月狐狸 阅读(2495) 评论(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 十月狐狸 阅读(1809) 评论(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 十月狐狸 阅读(15608) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 2. 函数实际上是调用getattr(object,name)函数,通过是否抛出AttributeError来判断是否含有属性。 阅读全文
posted @ 2016-10-29 10:34 十月狐狸 阅读(2403) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 阅读全文
posted @ 2016-10-29 10:33 十月狐狸 阅读(995) 评论(0) 推荐(0) 编辑
摘要: 英文文档: 2. 函数第三个参数default为可选参数,如果object中含义name属性,则返回name属性的值,如果没有name属性,则返回default值,如果default未传入值,则报错。 阅读全文
posted @ 2016-10-28 22:16 十月狐狸 阅读(8138) 评论(0) 推荐(1) 编辑
摘要: 英文文档: 2. 不传入参数时,生成的空的不可变集合。 阅读全文
posted @ 2016-10-28 22:05 十月狐狸 阅读(2110) 评论(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 十月狐狸 阅读(3513) 评论(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 十月狐狸 阅读(25078) 评论(0) 推荐(0) 编辑