1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/lib/__builtins__/__init__.py Tue Aug 30 21:55:58 2016 +0200
1.3 @@ -0,0 +1,105 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +"""
1.7 +Simple built-in classes and functions.
1.8 +
1.9 +Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
1.10 +
1.11 +This program is free software; you can redistribute it and/or modify it under
1.12 +the terms of the GNU General Public License as published by the Free Software
1.13 +Foundation; either version 3 of the License, or (at your option) any later
1.14 +version.
1.15 +
1.16 +This program is distributed in the hope that it will be useful, but WITHOUT
1.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.19 +details.
1.20 +
1.21 +You should have received a copy of the GNU General Public License along with
1.22 +this program. If not, see <http://www.gnu.org/licenses/>.
1.23 +"""
1.24 +
1.25 +from __builtins__.core import object, type, function, BaseException, Exception, Warning
1.26 +
1.27 +# Exceptions.
1.28 +
1.29 +from __builtins__.exception import (
1.30 + ArithmeticError,
1.31 + AssertionError,
1.32 + AttributeError,
1.33 + DeprecationWarning,
1.34 + EOFError,
1.35 + EnvironmentError,
1.36 + FloatingPointError,
1.37 + FutureWarning,
1.38 + GeneratorExit,
1.39 + ImportError,
1.40 + ImportWarning,
1.41 + IndentationError,
1.42 + IndexError,
1.43 + IOError,
1.44 + KeyError,
1.45 + KeyboardInterrupt,
1.46 + LookupError,
1.47 + MemoryError,
1.48 + NameError,
1.49 + NotImplementedError,
1.50 + OSError,
1.51 + OverflowError,
1.52 + PendingDeprecationWarning,
1.53 + ReferenceError,
1.54 + RuntimeError,
1.55 + RuntimeWarning,
1.56 + StandardError,
1.57 + StopIteration,
1.58 + SyntaxError,
1.59 + SyntaxWarning,
1.60 + SystemError,
1.61 + SystemExit,
1.62 + TabError,
1.63 + TypeError,
1.64 + UnboundLocalError,
1.65 + UnicodeDecodeError,
1.66 + UnicodeEncodeError,
1.67 + UnicodeError,
1.68 + UnicodeTranslateError,
1.69 + UnicodeWarning,
1.70 + UserWarning,
1.71 + ValueError,
1.72 + ZeroDivisionError
1.73 + )
1.74 +
1.75 +
1.76 +# Classes.
1.77 +
1.78 +from __builtins__.bool import bool
1.79 +from __builtins__.buffer import buffer
1.80 +from __builtins__.complex import complex
1.81 +from __builtins__.dict import dict
1.82 +from __builtins__.ellipsis import ellipsis
1.83 +from __builtins__.file import file
1.84 +from __builtins__.float import float
1.85 +from __builtins__.int import int
1.86 +from __builtins__.span import xrange, slice
1.87 +from __builtins__.iterator import listiterator
1.88 +from __builtins__.list import list
1.89 +from __builtins__.long import long
1.90 +from __builtins__.none import NoneType
1.91 +from __builtins__.notimplemented import NotImplementedType
1.92 +from __builtins__.property import property
1.93 +from __builtins__.set import frozenset, set
1.94 +from __builtins__.string import basestring, str, unicode
1.95 +from __builtins__.tuple import tuple
1.96 +
1.97 +# Functions.
1.98 +
1.99 +from __builtins__.attribute import getattr, hasattr, setattr
1.100 +from __builtins__.character import chr, hex, oct, ord, unichr
1.101 +from __builtins__.comparable import cmp, hash
1.102 +from __builtins__.identity import callable, help, id, isinstance, issubclass, repr
1.103 +from __builtins__.io import eval, open, raw_input
1.104 +from __builtins__.iterable import all, any, enumerate, filter, iter, len, map, max, min, range, reduce, reversed, sorted, sum, zip
1.105 +from __builtins__.namespace import dir, globals, locals, vars
1.106 +from __builtins__.numeric import abs, divmod, pow, round
1.107 +
1.108 +# vim: tabstop=4 expandtab shiftwidth=4