All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kr.motd.maven.sphinx.dist.future.builtins.newnext$py.class Maven / Gradle / Ivy

There is a newer version: 2.10.0
Show newest version
????1?f$0R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;__doc__?
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.
org/python/core/PyStringfromInterned.(Ljava/lang/String;)Lorg/python/core/PyString;	

org/python/core/PyFrame
	setglobal/(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline(I)V
nextgetname.(Ljava/lang/String;)Lorg/python/core/PyObject;

_builtin_nextsetlocal
 object"org/python/core/PyObject$__call__9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;&'
%(	_SENTINEL*org/python/core/PyFunction,	f_globalsLorg/python/core/PyObject;./	0	newnext$1?
    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.
    3getlocal(I)Lorg/python/core/PyObject;56
7__next__9__getattr__;
%<f_lastiI>?	@org/python/core/PyBsetExceptionM(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;DE
CFAttributeErrorH	getglobalJ
Korg/python/core/PyExceptionMmatch(Lorg/python/core/PyObject;)ZOP
NQ	TypeErrorS'{0}' object is not an iteratorUformatW	__class__Y__name__[S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;&]
%^
makeException9(Lorg/python/core/PyObject;)Lorg/python/core/PyException;`a
Cbjava/lang/Throwabled
StopIterationfvalueh/	Ni(ILorg/python/core/PyObject;)Vk
l_is6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject;no
%p__nonzero__()Zrs
%tNonev/	Cwfuture/builtins/newnext$pyyLorg/python/core/PyCode;2{	z|j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V~
-?newnext?org/python/core/PyList?([Lorg/python/core/PyObject;)V~?
??__all__?(Ljava/lang/String;)Vorg/python/core/PyFunctionTable?()V~?
??selfLfuture/builtins/newnext$py;??	z?java/lang/String??newCode?(I[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZLorg/python/core/PyFunctionTable;I[Ljava/lang/String;[Ljava/lang/String;II)Lorg/python/core/PyCode;??
C?{	z?iterator?default?e?getMain()Lorg/python/core/PyCode;main([Ljava/lang/String;)Vy~?
z???
z?org/python/core/CodeLoader?createSimpleBootstrap9(Lorg/python/core/PyCode;)Lorg/python/core/CodeBootstrap;??
??runMain5(Lorg/python/core/CodeBootstrap;[Ljava/lang/String;)V??
C?getCodeBootstrap!()Lorg/python/core/CodeBootstrap;#org/python/core/PyRunnableBootstrap?)getFilenameConstructorReflectionBootstrap2(Ljava/lang/Class;)Lorg/python/core/CodeBootstrap;??
??
call_functionS(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;
z?2
z?org/python/core/PyRunnable? Lorg/python/compiler/APIVersion;%Lorg/python/compiler/MTime;`9 G?Lorg/python/compiler/Filename;a/home/trustin/Workspaces/sphinx-maven-plugin/target/update-sphinx/dist/future/builtins/newnext.pyorg/python/core/ThreadState?CodeLineNumberTableStackMap
SourceFileRuntimeVisibleAnnotations!z????{2{???+??+%??W+'?+?N+-?!N+)?+#?,?)N++-?!N++??%N++?-__S?-Y+?1-?}4???N+?-?!N+F???Y?%Y??S??N+?-?!N+?A?x??%')+F2?[$+1?4?W+8?+?8:?=,?)N+?A-?+?G:+I?L?R?m+;?+?8?=,?)N+?A-?+?G:+I?L?R?7+=?+T?L,V?X?=,+?8Z?=\?=?_?_?c??????+?G:+g?L?R?[?j:+?m:+@?+?8:++?L_?q:?u?+A?+?8?c?+C?+?8N+?A-????	<QXeQXXe!(e!((e!?e!Q?eQ??e???e???e?18;=@AC??(z?eXz?Ne?e?z?NN?e?z?N?e?z?ez?Nez?Ne~??_
S*??*????M,+?????????M,?S,?S,?S,+?+?????}???????	??? ?zY???????*???	???z???????&*,-? ?ð?Ű??Mz?z? z?z?$z?z?????hI??hJ??hs?




© 2015 - 2024 Weber Informatics LLC | Privacy Policy