freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

python函數(shù)中文手冊(編輯修改稿)

2024-12-13 12:07 本頁面
 

【文章內容簡介】 bject) Return the “identity” of an object. This is an integer (or long integer) which is guaranteed to be unique and constant for this object during its lifetime. Two objects with nonoverlapping lifetimes may have the same id() value. 如果想知道某個對象的內存地址,用這個內置函數(shù) ,返回的是 10 進制的地址。 33. input([prompt]) Equivalent to eval(raw_input(prompt)). 34. int([x[, base]]) Convert a string or number to a plain integer. If the argument is a string, it must contain a possibly signed decimal number representable as a Python integer, possibly embedded in whitespace. The base parameter gives the base for the conversion (which is 10 by default) and may be any integer in the range [2, 36], or zero. If base is zero, the proper radix is determined based on the contents of string。 the interpretation is the same as for integer literals. (See Numeric literals.) If base is specified and x is not a string, TypeError is raised. Otherwise, the argument may be a plain or long integer or a floating point number. Conversion of floating point numbers to integers truncates (towards zero). If the argument is outside the integer range a long object will be returned instead. If no arguments are given, returns 0. 35. isinstance(object, classinfo) Return true if the object argument is an instance of the classinfo argument, or of a (direct or indirect) subclass thereof. Also return true if classinfo is a type object (newstyle class) and object is an object of that type or of a (direct or indirect) subclass thereof. If object is not a class instance or an object of the given type, the function always returns false. If classinfo is neither a class object nor a type object, it may be a tuple of class or type objects, or may recursively contain other such tuples (other sequence types are not accepted). If classinfo is not a class, type, or tuple of classes, types, and such tuples, a TypeError exception is raised. 36. issubclass(class, classinfo) Return true if class is a subclass (direct or indirect) of classinfo. A class is considered a subclass of itself. classinfo may be a tuple of class objects, in which case every entry in classinfo will be checked. In any other case, a TypeError exception is raised. 37. 導管,窗口,容器, 數(shù)據的窗口化 iter(o[, sentinel]) Return an iterator object. The first argument is interpreted very differently depending on the presence of the second argument. Without a second argument, o must be a collection object which supports the iteration protocol (the __iter__() method), or it must support the sequence protocol (the __getitem__() method with integer arguments starting at 0). If it does not support either of those protocols, TypeError is raised. If the second argument, sentinel, is given, then o must be a callable object. The iterator created in this case will call o with no arguments for each call to its next() method。 if the value returned is equal to sentinel, StopIteration will be raised, otherwise the value will be returned. iter(o[, sentinel])返回一個迭代器對象。第一個參數(shù)根據第二個參數(shù)進行編譯。第二參數(shù)為空, O 必須是支持迭代器的協(xié)議 (the __iter__() method)的集合對象 ,或者支持順序協(xié)議 (the __getitem__()method with integer arguments staring at 0).如果不支持其中任意一種協(xié)議,程序將會拋出類型異常。 假如第二個參數(shù)被給出,然后 O 必須是一個可被調用的對象。 迭代器 被創(chuàng)建萬一will 掉用 O with 沒有參數(shù) for each call to its next() method。 如果返回值和初始值相同 l, StopIteration 將會拋出 , 否則值會被返回! (常用函數(shù)) len(s) Return the length (the number of items) of an object. The argument may be a sequence (string, tuple or list) or a mapping (dictionary). 用法: list([iterable]) Return a list whose items are the same and in the same order as iterable‘s items. iterable may be either a sequence, a container that supports iteration, or an iterator object. If iterable is already a list, a copy is made and returned, similar to iterable[:]. For instance, list(39。abc39。) returns [39。a39。, 39。b39。, 39。c39。] and list( (1, 2, 3) ) returns [1, 2, 3]. If no argument is given, returns a new empty list, []. 40. locals() Update and return a dictionary representing the current local symbol table. Free variables are returned by locals() when it is called in function blocks, but not in class blocks. Update and return a dictionary 更新和返回字典 41. long([x[, base]]) Convert a string or number to a long integer. If the argument is a string, it must contain a possibly signed number of arbitrary size, possibly embedded in whitespace. The base argument is interpreted in the same way as for int(), and may only be given when x is a string. Otherwise, the argument may be a plain or long integer or a floating point number, and a long integer with the same value is returned. Conversion of floating point numbers to integers truncates (towards zero). If no arguments are given, returns 0L. 42. map(function, iterable, ...) Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments and is applied to the items from all itera
點擊復制文檔內容
試題試卷相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1