mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-27 12:44:19 +01:00
Added mapinto.
This commit is contained in:
parent
25224a79a1
commit
c5903a9591
@ -821,6 +821,10 @@ def toBool(s):
|
|||||||
else:
|
else:
|
||||||
raise ValueError, 'Invalid string for toBool: %r' % s
|
raise ValueError, 'Invalid string for toBool: %r' % s
|
||||||
|
|
||||||
|
def mapinto(f, L):
|
||||||
|
for (i, x) in enumerate(L):
|
||||||
|
L[i] = f(x)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import doctest
|
import doctest
|
||||||
doctest.testmod(sys.modules['__main__'])
|
doctest.testmod(sys.modules['__main__'])
|
||||||
|
Loading…
Reference in New Issue
Block a user