]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Add code for a range function that uses generators.
authorBrett Cannon <bcannon@gmail.com>
Sun, 27 Jun 2004 23:17:35 +0000 (23:17 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sun, 27 Jun 2004 23:17:35 +0000 (23:17 +0000)
commitc2b151c66ee9bc6e686400ee93e65e07d1999888
tree340f966be65a31060bbe8d47a272df9c861f69da
parenta6b3caad417c0472b611be251d623331744079a5
Add code for a range function that uses generators.

Cleaned up existing code by abstracting code to parse arguments.  Also removed
any unneeded operations (such as calling 'int' on a division when using floor
division also works).  Fixed a bug where the values  returned by
OldStyleRange could be short by one value.  Added more documentation.

Testing code also has a basic sanity check.
Demo/classes/Range.py