1.1 --- a/lib/__builtins__/__init__.py Thu Sep 01 23:05:46 2016 +0200
1.2 +++ b/lib/__builtins__/__init__.py Sat Sep 03 22:37:23 2016 +0200
1.3 @@ -76,7 +76,6 @@
1.4 from __builtins__.buffer import buffer
1.5 from __builtins__.complex import complex
1.6 from __builtins__.dict import dict
1.7 -from __builtins__.ellipsis import ellipsis
1.8 from __builtins__.file import file
1.9 from __builtins__.float import float
1.10 from __builtins__.int import int
1.11 @@ -86,9 +85,8 @@
1.12 from __builtins__.long import long
1.13 from __builtins__.none import NoneType
1.14 from __builtins__.notimplemented import NotImplementedType
1.15 -from __builtins__.property import property
1.16 from __builtins__.set import frozenset, set
1.17 -from __builtins__.string import basestring, str, unicode
1.18 +from __builtins__.str import basestring, str, unicode
1.19 from __builtins__.tuple import tuple
1.20
1.21 # Functions.
2.1 --- a/lib/__builtins__/ellipsis.py Thu Sep 01 23:05:46 2016 +0200
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,24 +0,0 @@
2.4 -#!/usr/bin/env python
2.5 -
2.6 -"""
2.7 -Ellipsis object.
2.8 -
2.9 -Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
2.10 -
2.11 -This program is free software; you can redistribute it and/or modify it under
2.12 -the terms of the GNU General Public License as published by the Free Software
2.13 -Foundation; either version 3 of the License, or (at your option) any later
2.14 -version.
2.15 -
2.16 -This program is distributed in the hope that it will be useful, but WITHOUT
2.17 -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2.18 -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2.19 -details.
2.20 -
2.21 -You should have received a copy of the GNU General Public License along with
2.22 -this program. If not, see <http://www.gnu.org/licenses/>.
2.23 -"""
2.24 -
2.25 -class ellipsis: pass
2.26 -
2.27 -# vim: tabstop=4 expandtab shiftwidth=4
3.1 --- a/lib/__builtins__/property.py Thu Sep 01 23:05:46 2016 +0200
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,25 +0,0 @@
3.4 -#!/usr/bin/env python
3.5 -
3.6 -"""
3.7 -Property objects.
3.8 -
3.9 -Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
3.10 -
3.11 -This program is free software; you can redistribute it and/or modify it under
3.12 -the terms of the GNU General Public License as published by the Free Software
3.13 -Foundation; either version 3 of the License, or (at your option) any later
3.14 -version.
3.15 -
3.16 -This program is distributed in the hope that it will be useful, but WITHOUT
3.17 -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
3.18 -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
3.19 -details.
3.20 -
3.21 -You should have received a copy of the GNU General Public License along with
3.22 -this program. If not, see <http://www.gnu.org/licenses/>.
3.23 -"""
3.24 -
3.25 -class property(object):
3.26 - def __init__(fget=None, fset=None, fdel=None, doc=None): pass
3.27 -
3.28 -# vim: tabstop=4 expandtab shiftwidth=4
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/lib/__builtins__/str.py Sat Sep 03 22:37:23 2016 +0200
4.3 @@ -0,0 +1,108 @@
4.4 +#!/usr/bin/env python
4.5 +
4.6 +"""
4.7 +String objects.
4.8 +
4.9 +Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
4.10 +
4.11 +This program is free software; you can redistribute it and/or modify it under
4.12 +the terms of the GNU General Public License as published by the Free Software
4.13 +Foundation; either version 3 of the License, or (at your option) any later
4.14 +version.
4.15 +
4.16 +This program is distributed in the hope that it will be useful, but WITHOUT
4.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
4.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
4.19 +details.
4.20 +
4.21 +You should have received a copy of the GNU General Public License along with
4.22 +this program. If not, see <http://www.gnu.org/licenses/>.
4.23 +"""
4.24 +
4.25 +from __builtins__.iterator import listiterator
4.26 +from __builtins__.operator import _binary_op, _negate
4.27 +import native
4.28 +
4.29 +class basestring(object):
4.30 + def __init__(self, data=None):
4.31 + # Note member.
4.32 + self.data = data
4.33 +
4.34 + def __contains__(self, value): pass
4.35 +
4.36 + def __getitem__(self, index):
4.37 + # Note usage.
4.38 + IndexError
4.39 +
4.40 + def __getslice__(self, start, end=None): pass
4.41 +
4.42 + def __iadd__(self, other):
4.43 + "Return a new string for the operation."
4.44 + return _binary_op(self, other, native._str_add)
4.45 +
4.46 + __add__ = __radd__ = __iadd__
4.47 +
4.48 + def __mul__(self, other): pass
4.49 + def __rmul__(self, other): pass
4.50 + def __mod__(self, other): pass
4.51 + def __rmod__(self, other): pass
4.52 +
4.53 + def __lt__(self, other):
4.54 + "Return a new boolean for the comparison."
4.55 + return _binary_op(self, other, native._str_lt)
4.56 +
4.57 + def __gt__(self, other):
4.58 + "Return a new boolean for the comparison."
4.59 + return _binary_op(self, other, native._str_gt)
4.60 +
4.61 + def __le__(self, other):
4.62 + "Return a new boolean for the comparison."
4.63 + return _negate(self.__gt__(other))
4.64 +
4.65 + def __ge__(self, other):
4.66 + "Return a new boolean for the comparison."
4.67 + return _negate(self.__lt__(other))
4.68 +
4.69 + def __eq__(self, other):
4.70 + "Return a new boolean for the comparison."
4.71 + return _binary_op(self, other, native._str_eq)
4.72 +
4.73 + def __ne__(self, other):
4.74 + "Return a new boolean for the comparison."
4.75 + return _negate(self.__eq__(other))
4.76 +
4.77 + def __len__(self): pass
4.78 + def __str__(self): pass
4.79 +
4.80 + def __bool__(self):
4.81 + return _negate(native._str_eq(self, ""))
4.82 +
4.83 + def endswith(self, s): pass
4.84 + def find(self, sub, start=None, end=None): pass
4.85 + def index(self, sub, start=None, end=None): pass
4.86 + def join(self, l): pass
4.87 + def lower(self): pass
4.88 + def lstrip(self, chars=None): pass
4.89 + def replace(self, old, new, count=None): pass
4.90 + def rfind(self, sub, start=None, end=None): pass
4.91 + def rsplit(self, sep=None, maxsplit=None): pass
4.92 + def rstrip(self, chars=None): pass
4.93 + def split(self, sep=None, maxsplit=None): pass
4.94 + def splitlines(self, keepends=False): pass
4.95 + def startswith(self, s): pass
4.96 + def strip(self, chars=None): pass
4.97 + def upper(self): pass
4.98 +
4.99 + def __iter__(self):
4.100 +
4.101 + "Return an iterator."
4.102 +
4.103 + return listiterator(self)
4.104 +
4.105 +class str(basestring):
4.106 + pass
4.107 +
4.108 +class unicode(basestring):
4.109 + def encode(self, encoding): pass
4.110 +
4.111 +# vim: tabstop=4 expandtab shiftwidth=4
5.1 --- a/lib/__builtins__/string.py Thu Sep 01 23:05:46 2016 +0200
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,108 +0,0 @@
5.4 -#!/usr/bin/env python
5.5 -
5.6 -"""
5.7 -String objects.
5.8 -
5.9 -Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
5.10 -
5.11 -This program is free software; you can redistribute it and/or modify it under
5.12 -the terms of the GNU General Public License as published by the Free Software
5.13 -Foundation; either version 3 of the License, or (at your option) any later
5.14 -version.
5.15 -
5.16 -This program is distributed in the hope that it will be useful, but WITHOUT
5.17 -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5.18 -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
5.19 -details.
5.20 -
5.21 -You should have received a copy of the GNU General Public License along with
5.22 -this program. If not, see <http://www.gnu.org/licenses/>.
5.23 -"""
5.24 -
5.25 -from __builtins__.iterator import listiterator
5.26 -from __builtins__.operator import _binary_op, _negate
5.27 -import native
5.28 -
5.29 -class basestring(object):
5.30 - def __init__(self, data=None):
5.31 - # Note member.
5.32 - self.data = data
5.33 -
5.34 - def __contains__(self, value): pass
5.35 -
5.36 - def __getitem__(self, index):
5.37 - # Note usage.
5.38 - IndexError
5.39 -
5.40 - def __getslice__(self, start, end=None): pass
5.41 -
5.42 - def __iadd__(self, other):
5.43 - "Return a new string for the operation."
5.44 - return _binary_op(self, other, native._str_add)
5.45 -
5.46 - __add__ = __radd__ = __iadd__
5.47 -
5.48 - def __mul__(self, other): pass
5.49 - def __rmul__(self, other): pass
5.50 - def __mod__(self, other): pass
5.51 - def __rmod__(self, other): pass
5.52 -
5.53 - def __lt__(self, other):
5.54 - "Return a new boolean for the comparison."
5.55 - return _binary_op(self, other, native._str_lt)
5.56 -
5.57 - def __gt__(self, other):
5.58 - "Return a new boolean for the comparison."
5.59 - return _binary_op(self, other, native._str_gt)
5.60 -
5.61 - def __le__(self, other):
5.62 - "Return a new boolean for the comparison."
5.63 - return _negate(self.__gt__(other))
5.64 -
5.65 - def __ge__(self, other):
5.66 - "Return a new boolean for the comparison."
5.67 - return _negate(self.__lt__(other))
5.68 -
5.69 - def __eq__(self, other):
5.70 - "Return a new boolean for the comparison."
5.71 - return _binary_op(self, other, native._str_eq)
5.72 -
5.73 - def __ne__(self, other):
5.74 - "Return a new boolean for the comparison."
5.75 - return _negate(self.__eq__(other))
5.76 -
5.77 - def __len__(self): pass
5.78 - def __str__(self): pass
5.79 -
5.80 - def __bool__(self):
5.81 - return _negate(native._str_eq(self, ""))
5.82 -
5.83 - def endswith(self, s): pass
5.84 - def find(self, sub, start=None, end=None): pass
5.85 - def index(self, sub, start=None, end=None): pass
5.86 - def join(self, l): pass
5.87 - def lower(self): pass
5.88 - def lstrip(self, chars=None): pass
5.89 - def replace(self, old, new, count=None): pass
5.90 - def rfind(self, sub, start=None, end=None): pass
5.91 - def rsplit(self, sep=None, maxsplit=None): pass
5.92 - def rstrip(self, chars=None): pass
5.93 - def split(self, sep=None, maxsplit=None): pass
5.94 - def splitlines(self, keepends=False): pass
5.95 - def startswith(self, s): pass
5.96 - def strip(self, chars=None): pass
5.97 - def upper(self): pass
5.98 -
5.99 - def __iter__(self):
5.100 -
5.101 - "Return an iterator."
5.102 -
5.103 - return listiterator(self)
5.104 -
5.105 -class str(basestring):
5.106 - pass
5.107 -
5.108 -class unicode(basestring):
5.109 - def encode(self, encoding): pass
5.110 -
5.111 -# vim: tabstop=4 expandtab shiftwidth=4