1.1 --- a/lib/builtins.py Sun Jun 07 21:17:59 2009 +0200
1.2 +++ b/lib/builtins.py Sun Jun 07 22:55:59 2009 +0200
1.3 @@ -1,9 +1,10 @@
1.4 #!/usr/bin/env python
1.5
1.6 """
1.7 -Simple built-in classes and functions.
1.8 +Simple built-in classes and functions. Objects which provide code which shall
1.9 +always be compiled should provide docstrings.
1.10
1.11 -Copyright (C) 2005, 2006, 2007, 2008 Paul Boddie <paul@boddie.org.uk>
1.12 +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie <paul@boddie.org.uk>
1.13
1.14 This program is free software; you can redistribute it and/or modify it under
1.15 the terms of the GNU General Public License as published by the Free Software
1.16 @@ -235,7 +236,7 @@
1.17 "Return the next item or raise a StopIteration exception."
1.18
1.19 if self.step < 0 and self.current <= self.end or self.step > 0 and self.current >= self.end:
1.20 - raise StopIteration
1.21 + raise StopIteration()
1.22
1.23 current = self.current
1.24 self.current += self.step
1.25 @@ -244,6 +245,9 @@
1.26 # Exceptions and warnings.
1.27
1.28 class BaseException(object):
1.29 +
1.30 + "Implementation of BaseException."
1.31 +
1.32 def __init__(self, *args):
1.33 self.args = args
1.34
1.35 @@ -277,7 +281,7 @@
1.36 class RuntimeError(Exception): pass
1.37 class RuntimeWarning(Warning): pass
1.38 class StandardError(Exception): pass
1.39 -class StopIteration(Exception): pass
1.40 +class StopIteration(Exception): "Implementation of StopIteration."
1.41 class SyntaxError(Exception): pass
1.42 class SyntaxWarning(Warning): pass
1.43 class SystemError(Exception): pass