paul@6 | 1 | #!/usr/bin/env python |
paul@6 | 2 | |
paul@6 | 3 | """ |
paul@6 | 4 | Simple built-in classes and functions. |
paul@6 | 5 | |
paul@934 | 6 | Copyright (C) 2015, 2016, 2017, 2019, 2021 Paul Boddie <paul@boddie.org.uk> |
paul@6 | 7 | |
paul@6 | 8 | This program is free software; you can redistribute it and/or modify it under |
paul@6 | 9 | the terms of the GNU General Public License as published by the Free Software |
paul@6 | 10 | Foundation; either version 3 of the License, or (at your option) any later |
paul@6 | 11 | version. |
paul@6 | 12 | |
paul@6 | 13 | This program is distributed in the hope that it will be useful, but WITHOUT |
paul@6 | 14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
paul@6 | 15 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
paul@6 | 16 | details. |
paul@6 | 17 | |
paul@6 | 18 | You should have received a copy of the GNU General Public License along with |
paul@6 | 19 | this program. If not, see <http://www.gnu.org/licenses/>. |
paul@6 | 20 | """ |
paul@6 | 21 | |
paul@470 | 22 | from __builtins__.core import ( |
paul@470 | 23 | function, get_using, module, object, type, |
paul@470 | 24 | ArithmeticError, Exception, FloatingPointError, MemoryError, OverflowError, |
paul@470 | 25 | TypeError, UnboundMethodInvocation, ZeroDivisionError |
paul@470 | 26 | ) |
paul@6 | 27 | |
paul@6 | 28 | # Exceptions. |
paul@6 | 29 | |
paul@6 | 30 | from __builtins__.exception import ( |
paul@6 | 31 | AssertionError, |
paul@6 | 32 | AttributeError, |
paul@6 | 33 | EOFError, |
paul@6 | 34 | EnvironmentError, |
paul@6 | 35 | IndentationError, |
paul@6 | 36 | IndexError, |
paul@6 | 37 | IOError, |
paul@868 | 38 | LoopExit, |
paul@6 | 39 | KeyError, |
paul@6 | 40 | KeyboardInterrupt, |
paul@6 | 41 | NotImplementedError, |
paul@6 | 42 | OSError, |
paul@6 | 43 | RuntimeError, |
paul@6 | 44 | StopIteration, |
paul@6 | 45 | SyntaxError, |
paul@6 | 46 | SystemError, |
paul@6 | 47 | SystemExit, |
paul@6 | 48 | TabError, |
paul@6 | 49 | UnicodeDecodeError, |
paul@6 | 50 | UnicodeEncodeError, |
paul@6 | 51 | UnicodeError, |
paul@6 | 52 | UnicodeTranslateError, |
paul@306 | 53 | ValueError |
paul@6 | 54 | ) |
paul@6 | 55 | |
paul@6 | 56 | # Classes. |
paul@6 | 57 | |
paul@158 | 58 | from __builtins__.boolean import bool, False, True |
paul@6 | 59 | from __builtins__.buffer import buffer |
paul@6 | 60 | from __builtins__.complex import complex |
paul@6 | 61 | from __builtins__.dict import dict |
paul@6 | 62 | from __builtins__.file import file |
paul@6 | 63 | from __builtins__.float import float |
paul@6 | 64 | from __builtins__.int import int |
paul@294 | 65 | from __builtins__.span import range, slice, xrange |
paul@6 | 66 | from __builtins__.list import list |
paul@6 | 67 | from __builtins__.long import long |
paul@135 | 68 | from __builtins__.none import None, NoneType |
paul@135 | 69 | from __builtins__.notimplemented import NotImplemented, NotImplementedType |
paul@6 | 70 | from __builtins__.set import frozenset, set |
paul@938 | 71 | from __builtins__.str import basestring, str |
paul@6 | 72 | from __builtins__.tuple import tuple |
paul@934 | 73 | from __builtins__.unicode import unicode |
paul@6 | 74 | |
paul@6 | 75 | # Functions. |
paul@6 | 76 | |
paul@6 | 77 | from __builtins__.attribute import getattr, hasattr, setattr |
paul@805 | 78 | from __builtins__.character import bin, chr, hex, oct, ord, unichr |
paul@6 | 79 | from __builtins__.comparable import cmp, hash |
paul@355 | 80 | from __builtins__.identity import callable, id, isinstance, issubclass, repr |
paul@332 | 81 | from __builtins__.io import open, raw_input, print_ |
paul@528 | 82 | from __builtins__.iteration import all, any, enumerate, filter, iter, len, map, max, min, reduce, reversed, sorted, sum, zip |
paul@6 | 83 | from __builtins__.namespace import dir, globals, locals, vars |
paul@6 | 84 | from __builtins__.numeric import abs, divmod, pow, round |
paul@6 | 85 | |
paul@6 | 86 | # vim: tabstop=4 expandtab shiftwidth=4 |