Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/past/builtins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/past/builtins/noniterators.pyo
�
,�]c@`s&dZddlmZmZmZddlmZmZddlZddlm	Z	ddl
mZd�Zer�ddl
Z
d�Zd	�Zd
�Zd�ZeZeZeZddlmZeZd
ddddgZn?ddlZejZejZejZejZejZgZdS(s,
This module is designed to be used as follows::

    from past.builtins.noniterators import filter, map, range, reduce, zip

And then, for example::

    assert isinstance(range(5), list)

The list-producing functions this brings in are::

- ``filter``
- ``map``
- ``range``
- ``reduce``
- ``zip``

i(tdivisiontabsolute_importtprint_function(tchaintstarmapN(t
basestring(tPY3cC`stjt||��S(N(Rt
from_iterabletmap(tftitems((s>/usr/lib/python2.7/site-packages/past/builtins/noniterators.pytflatmapscG`st|d�}t|dt�r<|�jtj|��St|dttf�rh|tj|��Sttj|��SdS(s*
        filter(function or None, sequence) -> list, tuple, or string

        Return those items of sequence for which function(item) is true.
        If function is None, return the items that are true.  If sequence
        is a tuple or string, return the same type, else return a list.
        iN(ttypet
isinstanceRtjointbuiltinstfilterttupletlist(targstmytype((s>/usr/lib/python2.7/site-packages/past/builtins/noniterators.pyt	oldfilter$scG`s�tj|�}t|�}t|�dkr1gS|dkrF|}ntt||��}yBtg|D]}t|�^qh�dkr�ttj|��SWnt	k
r�}nX|S(s
        map(function, sequence[, sequence, ...]) -> list

        Return a list of the results of applying the function to the
        items of the argument sequence(s).  If more than one sequence is
        given, the function is called with an argument list consisting of
        the corresponding item of each sequence, substituting None for
        missing values when not all sequences have the same length.  If
        the function is None, return a list of the items of the sequence
        (or a list of tuples if more than one sequence).

        Test cases:
        >>> oldmap(None, 'hello world')
        ['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd']

        >>> oldmap(None, range(4))
        [0, 1, 2, 3]

        More test cases are in test_past.test_builtins.
        iiN(
t	itertoolstzip_longestRtlentNoneRtmaxRRt	TypeError(tfunct	iterablestzippedtltresulttitemte((s>/usr/lib/python2.7/site-packages/past/builtins/noniterators.pytoldmap8s	+cO`sttj||��S(N(RRtrange(Rtkwargs((s>/usr/lib/python2.7/site-packages/past/builtins/noniterators.pytoldrange�scO`sttj||��S(N(RRtzip(RR%((s>/usr/lib/python2.7/site-packages/past/builtins/noniterators.pytoldzip�s(treduceRRR$R)R'(t__doc__t
__future__RRRRRRt
past.typesRt
past.utilsRRRRR#R&R(RRR$t	functoolsR)R't__all__t__builtin__(((s>/usr/lib/python2.7/site-packages/past/builtins/noniterators.pyt<module>s2			�							

Spamworldpro Mini