1.1 --- a/lib/__builtins__/sequence.py Mon Jul 02 17:53:15 2018 +0200
1.2 +++ b/lib/__builtins__/sequence.py Mon Jul 02 19:19:54 2018 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Sequence operations.
1.6
1.7 -Copyright (C) 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2015, 2016, 2017, 2018 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -267,4 +267,11 @@
1.13 else:
1.14 return index
1.15
1.16 +def _test_length(seq, length):
1.17 +
1.18 + "Helper function for asserting that 'seq' is of the given 'length'."
1.19 +
1.20 + if len(seq) != length:
1.21 + raise ValueError, length
1.22 +
1.23 # vim: tabstop=4 expandtab shiftwidth=4