Source

"""This module provides functions that will be builtins in Python 3.0,but that conflict with builtins that already exist in Python 2.x.Functions:hex(arg) -- Returns the hexadecimal representation of an integeroct(arg) -- Returns the octal representation of an integerascii(arg) -- Same as repr(arg)map, filter, zip -- Same as itertools.imap, ifilter, izipThe typical usage of this module is to replace existing builtins in amodule's namespace:from future_builtins import hex, oct"""__all__=['hex','oct','ascii','map','filter','zip']fromitertoolsimportimapasmap,ifilterasfilter,izipaszipascii=repr_builtin_hex=hex_builtin_oct=octdefhex(arg):return_builtin_hex(arg).rstrip('L')defoct(arg):result=_builtin_oct(arg).rstrip('L')ifresult=='0':return'0o0'i=result.index('0')+1returnresult[:i]+'o'+result[i:]