-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Docs: correct output from interactive mode in tutorial pages #91478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hi, thanks for the PR! Could you possibly change the title to something a bit more descriptive of the changes you've made? "updated tutorial example code output" isn't particularly helpful for core developers looking to review your PR. Also, please sign the CLA, as the bot suggests, or we probably won't be able to accept this PR for legal reasons 🙂 |
Hi @AlexWaygood. I made updates. Thanks! |
@@ -807,7 +807,6 @@ using the :func:`next` built-in function; this example shows how it all works:: | |||
>>> next(it) | |||
Traceback (most recent call last): | |||
File "<stdin>", line 1, in <module> | |||
next(it) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true for 3.12 and 3.11, but on current main
I get:
>>> next(it)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
next(it)
~~~~^^^^
StopIteration
@@ -339,7 +339,7 @@ Without arguments, :func:`dir` lists the names you have defined currently:: | |||
>>> import fibo | |||
>>> fib = fibo.fib | |||
>>> dir() | |||
['__builtins__', '__name__', 'a', 'fib', 'fibo', 'sys'] | |||
['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'a', 'fib', 'fibo', 'sys'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the example suggesting this is a fresh REPL session? If so, sys
is not imported.
['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'a', 'fib', 'fibo', 'sys'] | |
['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'a', 'fib', 'fibo'] |
Doc/tutorial/stdlib2.rst
Outdated
@@ -280,6 +280,7 @@ applications include caching objects that are expensive to create:: | |||
d['primary'] # entry was automatically removed | |||
File "C:/python311/lib/weakref.py", line 46, in __getitem__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File "C:/python311/lib/weakref.py", line 46, in __getitem__ | |
File "C:/python313/lib/weakref.py", line 136, in __getitem__ |
No description provided.