paul@61 | 1 | #!/usr/bin/env python |
paul@61 | 2 | |
paul@61 | 3 | """ |
paul@283 | 4 | Simple built-in classes and functions. Objects which provide code that shall |
paul@240 | 5 | always be compiled should provide docstrings. |
paul@61 | 6 | |
paul@368 | 7 | Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Paul Boddie <paul@boddie.org.uk> |
paul@61 | 8 | |
paul@61 | 9 | This program is free software; you can redistribute it and/or modify it under |
paul@61 | 10 | the terms of the GNU General Public License as published by the Free Software |
paul@61 | 11 | Foundation; either version 3 of the License, or (at your option) any later |
paul@61 | 12 | version. |
paul@61 | 13 | |
paul@61 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT |
paul@61 | 15 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
paul@61 | 16 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
paul@61 | 17 | details. |
paul@61 | 18 | |
paul@61 | 19 | You should have received a copy of the GNU General Public License along with |
paul@61 | 20 | this program. If not, see <http://www.gnu.org/licenses/>. |
paul@61 | 21 | """ |
paul@61 | 22 | |
paul@61 | 23 | class object: |
paul@61 | 24 | def __init__(self): pass |
paul@61 | 25 | def __bool__(self): pass |
paul@61 | 26 | |
paul@63 | 27 | class basestring(object): |
paul@63 | 28 | def __init__(self, x=None): pass |
paul@367 | 29 | def __contains__(self, value): pass |
paul@346 | 30 | |
paul@346 | 31 | def __getitem__(self, index): |
paul@346 | 32 | # Note usage. |
paul@346 | 33 | IndexError |
paul@346 | 34 | |
paul@63 | 35 | def __getslice__(self, start, end=None): pass |
paul@63 | 36 | def __iadd__(self, other): pass |
paul@63 | 37 | def __add__(self, other): pass |
paul@63 | 38 | def __radd__(self, other): pass |
paul@63 | 39 | def __mul__(self, other): pass |
paul@203 | 40 | def __rmul__(self, other): pass |
paul@63 | 41 | def __mod__(self, other): pass |
paul@202 | 42 | def __rmod__(self, other): pass |
paul@63 | 43 | def __lt__(self, other): pass |
paul@63 | 44 | def __gt__(self, other): pass |
paul@63 | 45 | def __le__(self, other): pass |
paul@63 | 46 | def __ge__(self, other): pass |
paul@63 | 47 | def __eq__(self, other): pass |
paul@63 | 48 | def __ne__(self, other): pass |
paul@63 | 49 | def __len__(self): pass |
paul@63 | 50 | def __str__(self): pass |
paul@63 | 51 | def __bool__(self): pass |
paul@63 | 52 | def join(self, l): pass |
paul@367 | 53 | def split(self, s): pass |
paul@367 | 54 | def startswith(self, s): pass |
paul@367 | 55 | def endswith(self, s): pass |
paul@63 | 56 | |
paul@63 | 57 | class bool(object): |
paul@61 | 58 | def __bool__(self): pass |
paul@61 | 59 | def __str__(self): pass |
paul@61 | 60 | |
paul@63 | 61 | class buffer(object): |
paul@61 | 62 | def __init__(self, size): pass |
paul@61 | 63 | def append(self, s): pass |
paul@61 | 64 | def __str__(self): pass |
paul@61 | 65 | |
paul@63 | 66 | class complex(object): |
paul@63 | 67 | def __init__(self, real, imag=None): pass |
paul@63 | 68 | |
paul@63 | 69 | class dict(object): |
paul@61 | 70 | def __init__(self, *args): pass |
paul@61 | 71 | def __setitem__(self, key, value): pass |
paul@346 | 72 | |
paul@346 | 73 | def __getitem__(self, key): |
paul@346 | 74 | # Note usage. |
paul@346 | 75 | KeyError |
paul@61 | 76 | |
paul@63 | 77 | class file(object): |
paul@367 | 78 | def read(self, n=None): pass |
paul@61 | 79 | def write(self, s): pass |
paul@367 | 80 | def close(self): pass |
paul@61 | 81 | |
paul@63 | 82 | class float(object): |
paul@61 | 83 | def __init__(self, number_or_string=None): pass |
paul@61 | 84 | def __iadd__(self, other): pass |
paul@61 | 85 | def __isub__(self, other): pass |
paul@61 | 86 | def __add__(self, other): pass |
paul@61 | 87 | def __radd__(self, other): pass |
paul@61 | 88 | def __sub__(self, other): pass |
paul@61 | 89 | def __rsub__(self, other): pass |
paul@61 | 90 | def __mul__(self, other): pass |
paul@61 | 91 | def __rmul__(self, other): pass |
paul@61 | 92 | def __div__(self, other): pass |
paul@61 | 93 | def __rdiv__(self, other): pass |
paul@61 | 94 | def __floordiv__(self, other): pass |
paul@61 | 95 | def __rfloordiv__(self, other): pass |
paul@61 | 96 | def __mod__(self, other): pass |
paul@202 | 97 | def __rmod__(self, other): pass |
paul@61 | 98 | def __pow__(self, other): pass |
paul@61 | 99 | def __rpow__(self, other): pass |
paul@61 | 100 | def __lt__(self, other): pass |
paul@61 | 101 | def __gt__(self, other): pass |
paul@61 | 102 | def __le__(self, other): pass |
paul@61 | 103 | def __ge__(self, other): pass |
paul@61 | 104 | def __eq__(self, other): pass |
paul@61 | 105 | def __ne__(self, other): pass |
paul@61 | 106 | def __neg__(self): pass |
paul@61 | 107 | def __pos__(self): pass |
paul@61 | 108 | def __str__(self): pass |
paul@61 | 109 | def __bool__(self): pass |
paul@61 | 110 | |
paul@63 | 111 | class frozenset(object): |
paul@63 | 112 | def __init__(self, iterable): pass |
paul@63 | 113 | |
paul@137 | 114 | class function(object): |
paul@137 | 115 | pass |
paul@137 | 116 | |
paul@63 | 117 | class int(object): |
paul@61 | 118 | def __init__(self, number_or_string=None): pass |
paul@61 | 119 | def __iadd__(self, other): pass |
paul@61 | 120 | def __isub__(self, other): pass |
paul@260 | 121 | def __iand__(self, other): pass |
paul@260 | 122 | def __ior__(self, other): pass |
paul@61 | 123 | def __add__(self, other): pass |
paul@61 | 124 | def __radd__(self, other): pass |
paul@61 | 125 | def __sub__(self, other): pass |
paul@61 | 126 | def __rsub__(self, other): pass |
paul@61 | 127 | def __mul__(self, other): pass |
paul@61 | 128 | def __rmul__(self, other): pass |
paul@61 | 129 | def __div__(self, other): pass |
paul@61 | 130 | def __rdiv__(self, other): pass |
paul@61 | 131 | def __floordiv__(self, other): pass |
paul@61 | 132 | def __rfloordiv__(self, other): pass |
paul@61 | 133 | def __mod__(self, other): pass |
paul@202 | 134 | def __rmod__(self, other): pass |
paul@61 | 135 | def __pow__(self, other): pass |
paul@202 | 136 | def __rpow__(self, other): pass |
paul@61 | 137 | def __and__(self, other): pass |
paul@61 | 138 | def __rand__(self, other): pass |
paul@61 | 139 | def __or__(self, other): pass |
paul@61 | 140 | def __ror__(self, other): pass |
paul@61 | 141 | def __xor__(self, other): pass |
paul@61 | 142 | def __rxor__(self, other): pass |
paul@61 | 143 | def __lt__(self, other): pass |
paul@61 | 144 | def __gt__(self, other): pass |
paul@61 | 145 | def __le__(self, other): pass |
paul@61 | 146 | def __ge__(self, other): pass |
paul@61 | 147 | def __eq__(self, other): pass |
paul@61 | 148 | def __ne__(self, other): pass |
paul@61 | 149 | def __neg__(self): pass |
paul@61 | 150 | def __pos__(self): pass |
paul@61 | 151 | def __str__(self): pass |
paul@61 | 152 | def __bool__(self): pass |
paul@260 | 153 | def __lshift__(self): pass |
paul@260 | 154 | def __rlshift__(self): pass |
paul@260 | 155 | def __rshift__(self): pass |
paul@260 | 156 | def __rrshift__(self): pass |
paul@61 | 157 | |
paul@63 | 158 | class list(object): |
paul@332 | 159 | |
paul@332 | 160 | "Implementation of list." |
paul@332 | 161 | |
paul@332 | 162 | def __init__(self, args=None): |
paul@332 | 163 | |
paul@332 | 164 | "Initialise the list." |
paul@332 | 165 | |
paul@332 | 166 | self.__new__() |
paul@332 | 167 | |
paul@332 | 168 | if args is not None: |
paul@367 | 169 | self.extend(args) |
paul@332 | 170 | |
paul@332 | 171 | def __new__(self): |
paul@336 | 172 | # Reserve space for a fragment reference. |
paul@336 | 173 | self._elements = None |
paul@332 | 174 | |
paul@346 | 175 | def __getitem__(self, index): |
paul@346 | 176 | # Note usage. |
paul@346 | 177 | IndexError |
paul@346 | 178 | |
paul@367 | 179 | def __contains__(self, value): pass |
paul@61 | 180 | def __setitem__(self, index, value): pass |
paul@61 | 181 | def __getslice__(self, start, end=None): pass |
paul@61 | 182 | def __setslice__(self, start, end, slice): pass |
paul@61 | 183 | def append(self, value): pass |
paul@367 | 184 | |
paul@367 | 185 | def extend(self, iterable): |
paul@367 | 186 | |
paul@367 | 187 | "Extend the list with the contents of 'iterable'." |
paul@367 | 188 | |
paul@367 | 189 | for i in iterable: |
paul@367 | 190 | self.append(i) |
paul@367 | 191 | |
paul@367 | 192 | def sort(self, cmp=None, key=None, reverse=0): pass |
paul@61 | 193 | def __len__(self): pass |
paul@61 | 194 | def __add__(self, other): pass |
paul@61 | 195 | def __iadd__(self, other): pass |
paul@61 | 196 | def __str__(self): pass |
paul@61 | 197 | def __bool__(self): pass |
paul@61 | 198 | |
paul@259 | 199 | def __iter__(self): |
paul@259 | 200 | |
paul@259 | 201 | "Return an iterator." |
paul@259 | 202 | |
paul@259 | 203 | return listiterator(self) |
paul@259 | 204 | |
paul@259 | 205 | class listiterator(object): |
paul@262 | 206 | |
paul@262 | 207 | "Implementation of listiterator." |
paul@262 | 208 | |
paul@262 | 209 | def __init__(self, l): |
paul@262 | 210 | |
paul@262 | 211 | "Initialise with the given list 'l'." |
paul@262 | 212 | |
paul@262 | 213 | self.l = l |
paul@262 | 214 | self.i = 0 |
paul@262 | 215 | |
paul@262 | 216 | def next(self): |
paul@262 | 217 | |
paul@262 | 218 | "Return the next item." |
paul@262 | 219 | |
paul@262 | 220 | try: |
paul@262 | 221 | value = self.l[self.i] |
paul@262 | 222 | self.i += 1 |
paul@262 | 223 | return value |
paul@262 | 224 | except IndexError: |
paul@338 | 225 | raise StopIteration() |
paul@259 | 226 | |
paul@63 | 227 | class long(object): |
paul@61 | 228 | def __init__(self, number_or_string=None): pass |
paul@61 | 229 | def __iadd__(self, other): pass |
paul@61 | 230 | def __isub__(self, other): pass |
paul@61 | 231 | def __add__(self, other): pass |
paul@61 | 232 | def __radd__(self, other): pass |
paul@61 | 233 | def __sub__(self, other): pass |
paul@61 | 234 | def __rsub__(self, other): pass |
paul@61 | 235 | def __mul__(self, other): pass |
paul@61 | 236 | def __rmul__(self, other): pass |
paul@61 | 237 | def __div__(self, other): pass |
paul@61 | 238 | def __rdiv__(self, other): pass |
paul@61 | 239 | def __floordiv__(self, other): pass |
paul@61 | 240 | def __rfloordiv__(self, other): pass |
paul@61 | 241 | def __and__(self, other): pass |
paul@61 | 242 | def __rand__(self, other): pass |
paul@61 | 243 | def __or__(self, other): pass |
paul@61 | 244 | def __ror__(self, other): pass |
paul@61 | 245 | def __xor__(self, other): pass |
paul@61 | 246 | def __rxor__(self, other): pass |
paul@61 | 247 | def __lt__(self, other): pass |
paul@61 | 248 | def __gt__(self, other): pass |
paul@61 | 249 | def __le__(self, other): pass |
paul@61 | 250 | def __ge__(self, other): pass |
paul@61 | 251 | def __eq__(self, other): pass |
paul@61 | 252 | def __ne__(self, other): pass |
paul@61 | 253 | def __neg__(self): pass |
paul@61 | 254 | def __pos__(self): pass |
paul@61 | 255 | def __str__(self): pass |
paul@61 | 256 | def __bool__(self): pass |
paul@61 | 257 | |
paul@63 | 258 | class set(object): |
paul@63 | 259 | def __init__(self, iterable): pass |
paul@61 | 260 | |
paul@342 | 261 | # See below for slice. |
paul@61 | 262 | |
paul@63 | 263 | class str(basestring): |
paul@63 | 264 | pass |
paul@61 | 265 | |
paul@63 | 266 | class type(object): |
paul@63 | 267 | pass |
paul@63 | 268 | |
paul@63 | 269 | class tuple(object): |
paul@61 | 270 | def __init__(self, args): pass |
paul@346 | 271 | |
paul@346 | 272 | def __getitem__(self, index): |
paul@346 | 273 | # Note usage. |
paul@346 | 274 | IndexError |
paul@346 | 275 | |
paul@61 | 276 | def __getslice__(self, start, end=None): pass |
paul@61 | 277 | def __len__(self): pass |
paul@61 | 278 | def __add__(self, other): pass |
paul@61 | 279 | def __str__(self): pass |
paul@61 | 280 | def __bool__(self): pass |
paul@61 | 281 | |
paul@338 | 282 | def __iter__(self): |
paul@338 | 283 | |
paul@338 | 284 | "Return an iterator." |
paul@338 | 285 | |
paul@338 | 286 | return listiterator(self) |
paul@338 | 287 | |
paul@63 | 288 | class unicode(basestring): |
paul@63 | 289 | pass |
paul@63 | 290 | |
paul@63 | 291 | class xrange(object): |
paul@239 | 292 | |
paul@239 | 293 | "Implementation of xrange." |
paul@239 | 294 | |
paul@373 | 295 | NO_END = object() |
paul@373 | 296 | |
paul@373 | 297 | def __init__(self, start_or_end, end=NO_END, step=1): |
paul@239 | 298 | |
paul@239 | 299 | "Initialise the xrange with the given 'start_or_end', 'end' and 'step'." |
paul@239 | 300 | |
paul@373 | 301 | if end is xrange.NO_END: |
paul@239 | 302 | self.start = 0 |
paul@239 | 303 | self.end = start_or_end |
paul@239 | 304 | else: |
paul@239 | 305 | self.start = start_or_end |
paul@239 | 306 | self.end = end |
paul@239 | 307 | |
paul@239 | 308 | self.step = step |
paul@239 | 309 | self.current = self.start |
paul@373 | 310 | self.limited = self.end is not xrange.NO_END |
paul@239 | 311 | |
paul@239 | 312 | def __iter__(self): |
paul@239 | 313 | |
paul@239 | 314 | "Return an iterator, currently self." |
paul@239 | 315 | |
paul@239 | 316 | return self |
paul@239 | 317 | |
paul@239 | 318 | def next(self): |
paul@239 | 319 | |
paul@239 | 320 | "Return the next item or raise a StopIteration exception." |
paul@239 | 321 | |
paul@342 | 322 | if self.limited: |
paul@342 | 323 | if self.step < 0 and self.current <= self.end or self.step > 0 and self.current >= self.end: |
paul@342 | 324 | raise StopIteration() |
paul@239 | 325 | |
paul@239 | 326 | current = self.current |
paul@239 | 327 | self.current += self.step |
paul@239 | 328 | return current |
paul@61 | 329 | |
paul@342 | 330 | class slice(xrange): |
paul@342 | 331 | |
paul@342 | 332 | "Implementation of slice." |
paul@342 | 333 | |
paul@373 | 334 | def __init__(self, start_or_end=None, end=xrange.NO_END, step=1): |
paul@342 | 335 | |
paul@342 | 336 | "Initialise the slice with the given 'start_or_end', 'end' and 'step'." |
paul@342 | 337 | |
paul@342 | 338 | xrange.__init__(self, start_or_end, end, step) |
paul@342 | 339 | |
paul@63 | 340 | # Exceptions and warnings. |
paul@63 | 341 | |
paul@63 | 342 | class BaseException(object): |
paul@240 | 343 | |
paul@240 | 344 | "Implementation of BaseException." |
paul@240 | 345 | |
paul@235 | 346 | def __init__(self, *args): |
paul@235 | 347 | self.args = args |
paul@61 | 348 | |
paul@63 | 349 | class Exception(BaseException): pass |
paul@63 | 350 | class Warning(object): pass |
paul@61 | 351 | |
paul@63 | 352 | class ArithmeticError(Exception): pass |
paul@63 | 353 | class AssertionError(Exception): pass |
paul@63 | 354 | class AttributeError(Exception): pass |
paul@63 | 355 | class DeprecationWarning(Exception): pass |
paul@63 | 356 | class EOFError(Exception): pass |
paul@63 | 357 | class EnvironmentError(Exception): pass |
paul@63 | 358 | class FloatingPointError(Exception): pass |
paul@63 | 359 | class FutureWarning(Warning): pass |
paul@63 | 360 | class GeneratorExit(Exception): pass |
paul@63 | 361 | class ImportError(Exception): pass |
paul@63 | 362 | class ImportWarning(Warning): pass |
paul@63 | 363 | class IndentationError(Exception): pass |
paul@63 | 364 | class IndexError(Exception): pass |
paul@216 | 365 | class IOError(Exception): pass |
paul@63 | 366 | class KeyError(Exception): pass |
paul@63 | 367 | class KeyboardInterrupt(Exception): pass |
paul@63 | 368 | class LookupError(Exception): pass |
paul@63 | 369 | class MemoryError(Exception): pass |
paul@63 | 370 | class NameError(Exception): pass |
paul@63 | 371 | class NotImplementedError(Exception): pass |
paul@63 | 372 | class OSError(Exception): pass |
paul@63 | 373 | class OverflowError(Exception): pass |
paul@63 | 374 | class PendingDeprecationWarning(Warning): pass |
paul@63 | 375 | class ReferenceError(Exception): pass |
paul@63 | 376 | class RuntimeError(Exception): pass |
paul@63 | 377 | class RuntimeWarning(Warning): pass |
paul@63 | 378 | class StandardError(Exception): pass |
paul@240 | 379 | class StopIteration(Exception): "Implementation of StopIteration." |
paul@63 | 380 | class SyntaxError(Exception): pass |
paul@63 | 381 | class SyntaxWarning(Warning): pass |
paul@63 | 382 | class SystemError(Exception): pass |
paul@63 | 383 | class SystemExit(Exception): pass |
paul@63 | 384 | class TabError(Exception): pass |
paul@63 | 385 | class TypeError(Exception): pass |
paul@63 | 386 | class UnboundLocalError(Exception): pass |
paul@63 | 387 | class UnicodeDecodeError(Exception): pass |
paul@63 | 388 | class UnicodeEncodeError(Exception): pass |
paul@63 | 389 | class UnicodeError(Exception): pass |
paul@63 | 390 | class UnicodeTranslateError(Exception): pass |
paul@63 | 391 | class UnicodeWarning(Warning): pass |
paul@63 | 392 | class UserWarning(Warning): pass |
paul@63 | 393 | class ValueError(Exception): pass |
paul@63 | 394 | class ZeroDivisionError(Exception): pass |
paul@61 | 395 | |
paul@63 | 396 | # Various types. |
paul@63 | 397 | |
paul@203 | 398 | #class ellipsis: pass |
paul@146 | 399 | class NoneType: pass |
paul@63 | 400 | class NotImplementedType: pass |
paul@61 | 401 | |
paul@63 | 402 | # General functions. |
paul@63 | 403 | # NOTE: Some of these are actually provided by classes in CPython. |
paul@63 | 404 | # NOTE: We may refuse to support some of these in practice, such as... |
paul@360 | 405 | # NOTE: __import__, super, reload. |
paul@63 | 406 | |
paul@63 | 407 | def abs(number): pass |
paul@63 | 408 | def all(iterable): pass |
paul@63 | 409 | def any(iterable): pass |
paul@63 | 410 | def callable(obj): pass |
paul@63 | 411 | def chr(i): pass |
paul@63 | 412 | def classmethod(function): pass |
paul@63 | 413 | def cmp(x, y): pass |
paul@63 | 414 | def compile(source, filename, mode, flags=None, dont_inherit=None): pass |
paul@63 | 415 | def delattr(obj, name): pass |
paul@63 | 416 | def dir(obj=None): pass |
paul@63 | 417 | def divmod(x, y): pass |
paul@63 | 418 | def enumerate(iterable): pass |
paul@63 | 419 | def eval(source, globals=None, locals=None): pass |
paul@63 | 420 | def execfile(filename, globals=None, locals=None): pass |
paul@63 | 421 | def filter(function, sequence): pass |
paul@63 | 422 | def getattr(obj, name, default=None): pass |
paul@63 | 423 | def globals(): pass |
paul@63 | 424 | def hasattr(obj, name): pass |
paul@63 | 425 | def hash(obj): pass |
paul@213 | 426 | def help(*args): pass |
paul@63 | 427 | def hex(number): pass |
paul@63 | 428 | def id(obj): pass |
paul@63 | 429 | def input(prompt=None): pass |
paul@63 | 430 | def isinstance(obj, cls_or_tuple): pass |
paul@63 | 431 | def issubclass(obj, cls_or_tuple): pass |
paul@334 | 432 | |
paul@334 | 433 | def iter(collection): |
paul@334 | 434 | |
paul@334 | 435 | "Implementation of iter without callable plus sentinel support." |
paul@334 | 436 | |
paul@334 | 437 | return collection.__iter__() |
paul@246 | 438 | |
paul@246 | 439 | def len(obj): |
paul@246 | 440 | |
paul@246 | 441 | "Implementation of len." |
paul@246 | 442 | |
paul@246 | 443 | return obj.__len__() |
paul@246 | 444 | |
paul@63 | 445 | def locals(): pass |
paul@342 | 446 | |
paul@63 | 447 | def map(function, *args): pass |
paul@342 | 448 | |
paul@342 | 449 | def max(*args): |
paul@342 | 450 | |
paul@342 | 451 | "Implementation of max." |
paul@342 | 452 | |
paul@342 | 453 | highest = args[0] |
paul@342 | 454 | for arg in args[1:]: |
paul@342 | 455 | if arg > highest: |
paul@342 | 456 | highest = arg |
paul@342 | 457 | return highest |
paul@342 | 458 | |
paul@342 | 459 | def min(*args): |
paul@342 | 460 | |
paul@342 | 461 | "Implementation of min." |
paul@342 | 462 | |
paul@342 | 463 | lowest = args[0] |
paul@342 | 464 | for arg in args[1:]: |
paul@342 | 465 | if arg > lowest: |
paul@342 | 466 | lowest = arg |
paul@342 | 467 | return lowest |
paul@342 | 468 | |
paul@63 | 469 | def oct(number): pass |
paul@63 | 470 | def open(name, mode=None, buffering=None): pass |
paul@63 | 471 | def ord(c): pass |
paul@63 | 472 | def pow(x, y, z=None): pass |
paul@63 | 473 | def property(fget=None, fset=None, fdel=None, doc=None): pass |
paul@246 | 474 | |
paul@246 | 475 | def range(start_or_end, end=None, step=1): |
paul@246 | 476 | |
paul@246 | 477 | "Implementation of range." |
paul@246 | 478 | |
paul@358 | 479 | return list(xrange(start_or_end, end, step)) |
paul@246 | 480 | |
paul@63 | 481 | def raw_input(prompt=None): pass |
paul@63 | 482 | def reduce(function, sequence, initial=None): pass |
paul@63 | 483 | def reload(module): pass |
paul@63 | 484 | def repr(obj): pass |
paul@63 | 485 | def reversed(sequence): pass |
paul@63 | 486 | def round(number, ndigits=None): pass |
paul@63 | 487 | def setattr(obj, name, value): pass |
paul@63 | 488 | def sorted(iterable, cmp=None, key=None, reverse=False): pass |
paul@63 | 489 | def staticmethod(function): pass |
paul@63 | 490 | def sum(sequence, start=0): pass |
paul@63 | 491 | def super(*args): pass |
paul@63 | 492 | def unichr(i): pass |
paul@63 | 493 | def vars(obj=None): pass |
paul@63 | 494 | def zip(*args): pass |
paul@63 | 495 | |
paul@167 | 496 | # Reference some names to ensure their existence. This should be everything |
paul@167 | 497 | # mentioned in a get_builtin or load_builtin call. Instances from this module |
paul@167 | 498 | # should be predefined constants. |
paul@167 | 499 | |
paul@167 | 500 | function |
paul@167 | 501 | AttributeError |
paul@345 | 502 | #StopIteration |
paul@167 | 503 | TypeError |
paul@346 | 504 | #IndexError |
paul@203 | 505 | |
paul@346 | 506 | #list |
paul@203 | 507 | tuple |
paul@203 | 508 | #xrange |
paul@203 | 509 | #ellipsis |
paul@203 | 510 | #bool |
paul@167 | 511 | |
paul@61 | 512 | # vim: tabstop=4 expandtab shiftwidth=4 |