迭代器python菜鸟_Python菜鸟之路:Python基础-生成器和迭代器、递归

#encoding: utf-8#module itertools#from (built-in)#by generator 1.138

"""Functional tools for creating and using iterators.

Infinite iterators: #无限迭代

count(start=0, step=1) --> start, start+step, start+2*step, ...

#从start开始,以后每个元素都加上step。step默认值为1,count(10) --> 10 11 12 13 14 ...

cycle(p) --> p0, p1, ... plast, p0, p1, ...

#迭代至序列p的最后一个元素后,从p的第一个元素重新开始 cycle('ABCD') --> A B C D A B C D ...

repeat(elem [,n]) --> elem, elem, elem, ... endlessly or up to n times

#将elem重复n次。如果不指定n,则无限重复 repeat(10, 3) --> 10 10 10

Iterators terminating on the shortest input sequence: #在最短的序列参数终止时停止迭代

accumulate(p[, func]) --> p0, p0+p1, p0+p1+p2

#从第一个元素开始,依次累加,accumulate([1,2,3,4,5,6,7.....]) --> 1,3,6,10,15,21,28...

chain(p, q, ...) --> p0, p1, ... plast, q0, q1, ...

#迭代至序列p的最后一个元素后,从q的第一个元素开始,直到所有序列终止 chain("ABC","BBC"):--> A B C B B C

chain.from_iterable([p, q, ...]) --> p0, p1, ... plast, q0, q1, ...

#迭代至序列p的最后一个元素后,从q的第一个元素开始,直到所有序列终止p,q都是可迭代对象,比如str: chain.from_iterable(["ABC","BBC"]) --> A B C B B C...

compress(data, selectors) --> (d[0] if s[0]), (d[1] if s[1]), ...

#如果bool(selectors[n])为True,则next()返回data[n],否则跳过data[n]。

dropwhile(pred, seq) --> seq[n], seq[n+1], starting when pred fails

#当pred对seq[n]的调用返回False时才开始迭代 dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1

groupby(iterable[, keyfunc]) --> sub-iterators grouped by value of keyfunc(v)

#这个函数功能类似于SQL的分组。使用groupby前,首先需要使用相同的keyfunc对iterable进行排序,比如调用内建的sorted函数。然后,groupby返回迭代器,每次迭代的元素是元组(key值, iterable中具有相同key值的元素的集合的子迭代器) groupby([0, 0, 0, 1, 1, 1, 2, 2, 2]) --> (0, (0 0 0)) (1, (1 1 1)) (2, (2 2 2))

filterfalse(pred, seq) --> elements of seq where pred(elem) is False

#如果序列sql中的元素,带入函数pred[seq[0]]返回False,则返回序列中的这个值 filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8

islice(seq, [start,] stop [, step]) --> elements from seq[start:stop:step]

#list(itertools.islice(range(100), 1, 10, 2)) --> [1, 3, 5, 7, 9]

starmap(fun, seq) --> fun(*seq[0]), fun(*seq[1]), ...

# 将seq的每个元素以变长参数(*args)的形式调用func, starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000

tee(it, n=2) --> (it1, it2 , ... itn) splits one iterator into n

# 返回n个迭代器it的复制迭代器。

takewhile(pred, seq) --> seq[0], seq[1], until pred fails

# dropwhile的相反版本 takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4

zip_longest(p, q, ...) --> (p[0], q[0]), (p[1], q[1]), ...

#zip的取最长序列的版本,短序列将填入fillvalue。

Combinatoric generators:# 组合迭代器

product(p, q, ... [repeat=1]) --> cartesian product

# 笛卡尔积 print(list(itertools.product('ABC', repeat=2))) -> [('A', 'A'), ('A', 'B'), ('A', 'C'), ('B', 'A'), ('B', 'B'), ('B', 'C'), ('C', 'A'), ('C', 'B'), ('C', 'C')]

permutations(p[, r])

# 去除重复的元素 print(list(itertools.permutations('ABC', 2)))-->[('A', 'B'), ('A', 'C'), ('B', 'A'), ('B', 'C'), ('C', 'A'), ('C', 'B')]

combinations(p, r)

# 排序后去重print(list(itertools.combinations('ABC', 2))) -> [('A', 'B'), ('A', 'C'), ('B', 'C')]

combinations_with_replacement(p, r)

# 排序后,包含重复元素 print(list(itertools.combinations_with_replacement('ABC', 2)))->[('A', 'A'), ('A', 'B'), ('A', 'C'), ('B', 'B'), ('B', 'C'), ('C', 'C')]"""

#no imports

#functions

def tee(iterable, n=2): #real signature unknown; restored from __doc__

"""tee(iterable, n=2) --> tuple of n independent iterators."""

pass

#classes

classaccumulate(object):"""accumulate(iterable[, func]) --> accumulate object

Return series of accumulated sums (or other binary function results)."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, iterable, func=None): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

classchain(object):"""chain(*iterables) --> chain object

Return a chain object whose .__next__() method returns elements from the

first iterable until it is exhausted, then elements from the next

iterable, until all of the iterables are exhausted."""@classmethoddef from_iterable(cls, iterable): #real signature unknown; restored from __doc__

"""chain.from_iterable(iterable) --> chain object

Alternate chain() contructor taking a single iterable argument

that evaluates lazily."""

pass

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, *iterables): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

classcombinations(object):"""combinations(iterable, r) --> combinations object

Return successive r-length combinations of elements in the iterable.

combinations(range(4), 3) --> (0,1,2), (0,1,3), (0,2,3), (1,2,3)"""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, iterable, r): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

def __sizeof__(self, *args, **kwargs): #real signature unknown

"""Returns size in memory, in bytes."""

pass

classcombinations_with_replacement(object):"""combinations_with_replacement(iterable, r) --> combinations_with_replacement object

Return successive r-length combinations of elements in the iterable

allowing individual elements to have successive repeats.

combinations_with_replacement('ABC', 2) --> AA AB AC BB BC CC"""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, iterable, r): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

def __sizeof__(self, *args, **kwargs): #real signature unknown

"""Returns size in memory, in bytes."""

pass

classcompress(object):"""compress(data, selectors) --> iterator over selected data

Return data elements corresponding to true selector elements.

Forms a shorter iterator from selected data elements using the

selectors to choose the data elements."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, data, selectors): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

classcount(object):"""count(start=0, step=1) --> count object

Return a count object whose .__next__() method returns consecutive values.

Equivalent to:

def count(firstval=0, step=1):

x = firstval

while 1:

yield x

x += step"""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, start=0, step=1): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __repr__(self, *args, **kwargs): #real signature unknown

"""Return repr(self)."""

pass

classcycle(object):"""cycle(iterable) --> cycle object

Return elements from the iterable until it is exhausted.

Then repeat the sequence indefinitely."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, iterable): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

classdropwhile(object):"""dropwhile(predicate, iterable) --> dropwhile object

Drop items from the iterable while predicate(item) is true.

Afterwards, return every element until the iterable is exhausted."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, predicate, iterable): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

classfilterfalse(object):"""filterfalse(function or None, sequence) --> filterfalse object

Return those items of sequence for which function(item) is false.

If function is None, return the items that are false."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, function_or_None, sequence): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

classgroupby(object):"""groupby(iterable[, keyfunc]) -> create an iterator which returns

(key, sub-iterator) grouped by each value of key(value)."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, iterable, key=None): #known case of itertools.groupby.__init__

"""Initialize self. See help(type(self)) for accurate signature."""

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

classislice(object):"""islice(iterable, stop) --> islice object

islice(iterable, start, stop[, step]) --> islice object

Return an iterator whose next() method returns selected values from an

iterable. If start is specified, will skip all preceding elements;

otherwise, start defaults to zero. Step defaults to one. If

specified as another value, step determines how many values are

skipped between successive calls. Works like a slice() on a list

but returns an iterator."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, iterable, stop): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

classpermutations(object):"""permutations(iterable[, r]) --> permutations object

Return successive r-length permutations of elements in the iterable.

permutations(range(3), 2) --> (0,1), (0,2), (1,0), (1,2), (2,0), (2,1)"""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, iterable, r=None): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

def __sizeof__(self, *args, **kwargs): #real signature unknown

"""Returns size in memory, in bytes."""

pass

classproduct(object):"""product(*iterables, repeat=1) --> product object

Cartesian product of input iterables. Equivalent to nested for-loops.

For example, product(A, B) returns the same as: ((x,y) for x in A for y in B).

The leftmost iterators are in the outermost for-loop, so the output tuples

cycle in a manner similar to an odometer (with the rightmost element changing

on every iteration).

To compute the product of an iterable with itself, specify the number

of repetitions with the optional repeat keyword argument. For example,

product(A, repeat=4) means the same as product(A, A, A, A).

product('ab', range(3)) --> ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)

product((0,1), (0,1), (0,1)) --> (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ..."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, *iterables, repeat=1): #known case of itertools.product.__init__

"""Initialize self. See help(type(self)) for accurate signature."""

return[]def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

def __sizeof__(self, *args, **kwargs): #real signature unknown

"""Returns size in memory, in bytes."""

pass

classrepeat(object):"""repeat(object [,times]) -> create an iterator which returns the object

for the specified number of times. If not specified, returns the object

endlessly."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, p_object, times=None): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass

def __length_hint__(self, *args, **kwargs): #real signature unknown

"""Private method returning an estimate of len(list(it))."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __repr__(self, *args, **kwargs): #real signature unknown

"""Return repr(self)."""

pass

classstarmap(object):"""starmap(function, sequence) --> starmap object

Return an iterator whose values are returned from the function evaluated

with an argument tuple taken from the given sequence."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, function, sequence): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

classtakewhile(object):"""takewhile(predicate, iterable) --> takewhile object

Return successive entries from an iterable as long as the

predicate evaluates to true for each entry."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, predicate, iterable): #real signature unknown; restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

classzip_longest(object):"""zip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --> zip_longest object

Return an zip_longest object whose .__next__() method returns a tuple where

the i-th element comes from the i-th iterable argument. The .__next__()

method continues until the longest iterable in the argument sequence

is exhausted and then it raises StopIteration. When the shorter iterables

are exhausted, the fillvalue is substituted in their place. The fillvalue

defaults to None or can be specified by a keyword argument."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, iter1, iter2=None, *some, **kwargs): #real signature unknown; NOTE: unreliably restored from __doc__

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

class_grouper(object):#no doc

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, *args, **kwargs): #real signature unknown

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

class_tee(object):"""Iterator wrapped to make it copyable"""

def __copy__(self, *args, **kwargs): #real signature unknown

"""Returns an independent iterator."""

pass

def __init__(self, *args, **kwargs): #real signature unknown

pass

def __iter__(self, *args, **kwargs): #real signature unknown

"""Implement iter(self)."""

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __next__(self, *args, **kwargs): #real signature unknown

"""Implement next(self)."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

def __setstate__(self, *args, **kwargs): #real signature unknown

"""Set state information for unpickling."""

pass

class_tee_dataobject(object):"""Data container common to multiple tee objects."""

def __getattribute__(self, *args, **kwargs): #real signature unknown

"""Return getattr(self, name)."""

pass

def __init__(self, *args, **kwargs): #real signature unknown

pass@staticmethod#known case of __new__

def __new__(*args, **kwargs): #real signature unknown

"""Create and return a new object. See help(type) for accurate signature."""

pass

def __reduce__(self, *args, **kwargs): #real signature unknown

"""Return state information for pickling."""

pass

class __loader__(object):"""Meta path import for built-in modules.

All methods are either class or static methods to avoid the need to

instantiate the class."""@classmethoddef create_module(cls, *args, **kwargs): #real signature unknown

"""Create a built-in module"""

pass@classmethoddef exec_module(cls, *args, **kwargs): #real signature unknown

"""Exec a built-in module"""

pass@classmethoddef find_module(cls, *args, **kwargs): #real signature unknown

"""Find the built-in module.

If 'path' is ever specified then the search is considered a failure.

This method is deprecated. Use find_spec() instead."""

pass@classmethoddef find_spec(cls, *args, **kwargs): #real signature unknown

pass@classmethoddef get_code(cls, *args, **kwargs): #real signature unknown

"""Return None as built-in modules do not have code objects."""

pass@classmethoddef get_source(cls, *args, **kwargs): #real signature unknown

"""Return None as built-in modules do not have source code."""

pass@classmethoddef is_package(cls, *args, **kwargs): #real signature unknown

"""Return False as built-in modules are never packages."""

pass@classmethoddef load_module(cls, *args, **kwargs): #real signature unknown

"""Load the specified module into sys.modules and return it.

This method is deprecated. Use loader.exec_module instead."""

pass

def module_repr(module): #reliably restored by inspect

"""Return repr for the module.

The method is deprecated. The import machinery does the job itself."""

pass

def __init__(self, *args, **kwargs): #real signature unknown

pass

__weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) #default

"""list of weak references to the object (if defined)"""

__dict__ = None #(!) real value is ''

#variables with complex values

__spec__ = None #(!) real value is ''

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值