随笔分类 -  python 内置函数

摘要:英文文档: staticmethod(function) Return a static method for function. A static method does not receive an implicit first argument. The @staticmethod form 阅读全文
posted @ 2017-12-29 17:00 lincappu 阅读(399) 评论(0) 推荐(0) 编辑
摘要:英文文档: classmethod(function) Return a class method for function. A class method receives the class as implicit first argument, just like an instance me 阅读全文
posted @ 2017-12-29 16:58 lincappu 阅读(742) 评论(0) 推荐(0) 编辑
摘要:英文文档: class property(fget=None, fset=None, fdel=None, doc=None) Return a property attribute. fget is a function for getting an attribute value. fset i 阅读全文
posted @ 2017-12-29 16:57 lincappu 阅读(319) 评论(0) 推荐(0) 编辑
摘要:英文文档: 第一个参数为语句字符串,globals参数和locals参数为可选参数,如果提供,globals参数必需是字典,locals参数为mapping对象。 2.能够读取局部和全部变量,并且能修改全局变量,这个要注意的是,他修改完全局变量的值后,只能在内部使用因为没有 return 的功能,( 阅读全文
posted @ 2017-12-29 16:56 lincappu 阅读(351) 评论(0) 推荐(0) 编辑
摘要:英文文档: This function can also be used to execute arbitrary code objects (such as those created by compile()). In this case pass a code object instead o 阅读全文
posted @ 2017-12-29 16:55 lincappu 阅读(398) 评论(0) 推荐(0) 编辑
摘要:英文文档: compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1) 阅读全文
posted @ 2017-12-29 16:54 lincappu 阅读(781) 评论(0) 推荐(0) 编辑
摘要:英文文档: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) Open file and return a corresponding fil 阅读全文
posted @ 2017-12-29 16:52 lincappu 阅读(273) 评论(0) 推荐(0) 编辑
摘要:英文文档: 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 @ 2017-12-29 16:50 lincappu 阅读(228) 评论(0) 推荐(0) 编辑
摘要:英文文档: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) Print objects to the text stream file, separated by sep and followed by end. se 阅读全文
posted @ 2017-12-29 16:37 lincappu 阅读(329) 评论(0) 推荐(0) 编辑
摘要:英文文档: locals() Update and return a dictionary representing the current local symbol table. Free variables are returned by locals()when it is called in 阅读全文
posted @ 2017-12-29 16:35 lincappu 阅读(317) 评论(0) 推荐(0) 编辑
摘要:英文文档: 阅读全文
posted @ 2017-12-29 16:34 lincappu 阅读(274) 评论(0) 推荐(0) 编辑
摘要:英文文档: callable(object) Return True if the object argument appears callable, False if not. If this returns true, it is still possible that a call fails 阅读全文
posted @ 2017-12-29 16:33 lincappu 阅读(385) 评论(0) 推荐(1) 编辑
摘要:英文文档: setattr(object, name, value) This is the counterpart of getattr(). The arguments are an object, a string and an arbitrary value. The string may 阅读全文
posted @ 2017-12-29 16:32 lincappu 阅读(318) 评论(0) 推荐(0) 编辑
摘要:英文文档: getattr(object, name[, default])Return the value of the named attribute of object. name must be a string. If the string is the name of one of th 阅读全文
posted @ 2017-12-29 16:26 lincappu 阅读(214) 评论(0) 推荐(0) 编辑
摘要:英文文档: 阅读全文
posted @ 2017-12-29 16:25 lincappu 阅读(245) 评论(0) 推荐(0) 编辑
摘要:英文文档: issubclass(class, classinfo)Return true if class is a subclass (direct, indirect or virtual) of classinfo. A class is considered a subclass of i 阅读全文
posted @ 2017-12-29 16:24 lincappu 阅读(989) 评论(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 @ 2017-12-29 16:22 lincappu 阅读(441) 评论(0) 推荐(0) 编辑
摘要:英文文档: __import__(name, globals=None, locals=None, fromlist=(), level=0) This function is invoked by the import statement. It can be replaced (by impor 阅读全文
posted @ 2017-12-29 16:21 lincappu 阅读(256) 评论(0) 推荐(0) 编辑
摘要:英文文档: 返回当前作用域内的局部变量和其值组成的字典,或者返回对象的属性列表 说明 1. 当函数不接收参数时,其功能和locals函数一样,返回当前作用域内的局部变量。 2. 当函数接收一个参数时,参数可以是模块、类、类实例,或者定义了__dict__属性的对象。 阅读全文
posted @ 2017-12-29 16:20 lincappu 阅读(540) 评论(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 @ 2017-12-29 16:18 lincappu 阅读(305) 评论(0) 推荐(0) 编辑