Lichen

Annotated lib/native.py

161:49376f3ab03d
2016-10-31 Paul Boddie Replace the native module code with actual native template code. Refined the use of native code for list and tuple initialisation.
paul@6 1
#!/usr/bin/env python
paul@6 2
paul@6 3
"""
paul@6 4
Native library functions.
paul@6 5
paul@6 6
Copyright (C) 2011, 2015, 2016 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@6 22
def _is(x, y): pass
paul@6 23
def _is_not(x, y): pass
paul@6 24
paul@6 25
def _int_add(self, other): pass
paul@6 26
def _int_sub(self, other): pass
paul@6 27
def _int_mul(self, other): pass
paul@6 28
def _int_div(self, other): pass
paul@6 29
def _int_mod(self, other): pass
paul@6 30
def _int_pow(self, other): pass
paul@6 31
def _int_and(self, other): pass
paul@6 32
def _int_or(self, other): pass
paul@6 33
def _int_xor(self, other): pass
paul@6 34
paul@6 35
def _int_rsub(self, other): pass
paul@6 36
def _int_rdiv(self, other): pass
paul@6 37
def _int_rmod(self, other): pass
paul@6 38
def _int_rpow(self, other): pass
paul@6 39
paul@6 40
def _int_lt(self, other): pass
paul@6 41
def _int_gt(self, other): pass
paul@6 42
def _int_eq(self, other): pass
paul@6 43
paul@6 44
def _str_add(self, other): pass
paul@6 45
def _str_lt(self, other): pass
paul@6 46
def _str_gt(self, other): pass
paul@6 47
def _str_eq(self, other): pass
paul@140 48
def _str_len(self): pass
paul@140 49
def _str_nonempty(self): pass
paul@140 50
paul@161 51
def _list_init(size): pass
paul@140 52
def _list_len(self): pass
paul@140 53
def _list_nonempty(self): pass
paul@140 54
def _list_element(self, index): pass
paul@6 55
paul@159 56
def _list_to_tuple(l): pass
paul@159 57
paul@161 58
def _tuple_init(args, size): pass
paul@159 59
def _tuple_len(self): pass
paul@159 60
def _tuple_element(self, index): pass
paul@159 61
paul@6 62
def _isinstance(obj, cls): pass
paul@6 63
paul@6 64
# vim: tabstop=4 expandtab shiftwidth=4