Commit f9b80106 authored by Boxiang Sun's avatar Boxiang Sun

add test file for future builtin functions

parent b26e85f0
from future_builtins import hex, oct, map, zip, filter
from itertools import imap, izip, ifilter
value_list1 = [0, 42, 42L, -42, -42L, "", (), {}, []]
value_list2 = [0, 100, 100L, -100, -100L]
for value1 in value_list1:
try:
print(hex(value1))
except Exception as e:
print(type(e), e.message)
for value2 in value_list2:
try:
print(oct(value2))
except Exception as e:
print(type(e), e.message)
print(map == imap)
print(zip == izip)
print(filter == ifilter)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment