Why does print(“…”), i.e. three dots in a row, print blank?

Looks like this is a known issue with Pycharm where its interactive console removes the leading three periods from a print statement. Here’s the ticket tracking this issue.


A possible workaround for now is defining something like:

def iprint(obj):
    if (s:=str(obj)).startswith("..."):
        print(" "+s)
    else:
        print(s)

which looks like:

>>> iprint("...ymmv")
 ...ymmv

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)