diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-08-09 10:25:32 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-08-09 10:25:32 (GMT) |
commit | e939f383c183806d82f9b07d27f766c03d170e18 (patch) | |
tree | 8af3fa18d21e3568d9256df982cdbed0f9ffd36e | |
parent | efcaba065ee06aba54d735b68bec5b89ba212497 (diff) | |
download | cpython-e939f383c183806d82f9b07d27f766c03d170e18.zip cpython-e939f383c183806d82f9b07d27f766c03d170e18.tar.gz cpython-e939f383c183806d82f9b07d27f766c03d170e18.tar.bz2 |
Fix documentation for inspect module to pass doctest
-rw-r--r-- | Doc/library/inspect.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index ac0d6e6..3ec17d6 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -494,14 +494,14 @@ Classes and functions >>> from inspect import getcallargs >>> def f(a, b=1, *pos, **named): ... pass - >>> getcallargs(f, 1, 2, 3) - {'a': 1, 'named': {}, 'b': 2, 'pos': (3,)} - >>> getcallargs(f, a=2, x=4) - {'a': 2, 'named': {'x': 4}, 'b': 1, 'pos': ()} + >>> getcallargs(f, 1, 2, 3) == {'a': 1, 'named': {}, 'b': 2, 'pos': (3,)} + True + >>> getcallargs(f, a=2, x=4) == {'a': 2, 'named': {'x': 4}, 'b': 1, 'pos': ()} + True >>> getcallargs(f) Traceback (most recent call last): ... - TypeError: f() takes at least 1 argument (0 given) + TypeError: f() missing 1 required positional argument: 'a' .. versionadded:: 3.2 |