Server IP : 127.0.0.2 / Your IP : 3.148.206.183 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/future/builtins/ |
Upload File : |
""" This module is designed to be used as follows:: from future.builtins.iterators import * And then, for example:: for i in range(10**15): pass for (a, b) in zip(range(10**15), range(-10**15, 0)): pass Note that this is standard Python 3 code, plus some imports that do nothing on Python 3. The iterators this brings in are:: - ``range`` - ``filter`` - ``map`` - ``zip`` On Python 2, ``range`` is a pure-Python backport of Python 3's ``range`` iterator with slicing support. The other iterators (``filter``, ``map``, ``zip``) are from the ``itertools`` module on Python 2. On Python 3 these are available in the module namespace but not exported for * imports via __all__ (zero no namespace pollution). Note that these are also available in the standard library ``future_builtins`` module on Python 2 -- but not Python 3, so using the standard library version is not portable, nor anywhere near complete. """ from __future__ import division, absolute_import, print_function import itertools from future import utils if not utils.PY3: filter = itertools.ifilter map = itertools.imap from future.types import newrange as range zip = itertools.izip __all__ = ['filter', 'map', 'range', 'zip'] else: import builtins filter = builtins.filter map = builtins.map range = builtins.range zip = builtins.zip __all__ = []