Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Inconsistent behavior when using ellipsis (...) versus pass in function/class definition #979

Copy link
Copy link
@ericmburgess

Description

@ericmburgess
Issue body actions

Notice it takes one more <enter> press to get the >>> prompt back when using ... in a function or class body, compared to using pass. On the "extra" line with the three-dots prompt, the cursor is not auto-indented, either. I've added underscores to show where the cursor appears on each line.

bpython version 0.23 on top of Python 3.11.1 /Users/eric/.pyenv/versions/3.11.1/bin/python3.11
>>> def foo():
...     ...
...     _
... _
>>> def bar():
...     pass
...     _
>>> class Foo():
...     ...
...     _
... _
>>> class Bar():
...     pass
...     _
>>>

For reference, the standard python console:

Python 3.11.1 (main, Jan 11 2023, 13:54:50) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo():
...     ...
...
>>> def bar():
...     pass
...
>>> class Foo():
...     ...
...
>>> class Bar():
...     pass
...
>>>
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.