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