[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pycharm Won't Do Long Underscore

                   Thank you so much! It worked! Thank you. One question: in your reply, are you saying that Python would have treated the two separate underscores the same way as a long  underscore i.e. it's a stylistic choice rather than a functional necessity?
   In any case, thanks again for your quick and easy to follow - even for me - reply.

Get Outlook for Android<>

From: Alexander Neilson <alexander at>
Sent: Tuesday, June 23, 2020 9:28:37 PM
To: Tony Kaloki <tkaloki at>
Cc: python-list at <python-list at>
Subject: Re: Pycharm Won't Do Long Underscore

Hi Tony

The ?long underscore? (often called Dunder as ?double underscore?) is actually two underscores as you are seeing shown in PyCharm.

However the display of it as one long underscore is a ligature (special font display to communicate clearer) and to enable these in PyCharm go to the settings dialog (depending on windows or Mac this could be in different locations) and select Editor > Font

In that screen select ?enable font ligatures? and if your font supports it (like the default JetBrains Mono does) that will start to display the double underscores as a single long underscore.


Alexander Neilson
Neilson Productions Limited
021 329 681
alexander at

> On 24/06/2020, at 07:57, Tony Kaloki <tkaloki at> wrote:
> ?
> Sent from Mail<> for Windows 10
> From: Tony Kaloki<mailto:Tkaloki at>
> Sent: 23 June 2020 19:45
> To: python-list at<mailto:python-list at>
> Subject: Pycharm Won't Do Long Underscore
> Hi Guys,
>               I?ve just begun to learn basic computer programming by downloading Python and Pycharm and following Youtube tutorials. But I?ve come across a problem that?s stopped me in my tracks.
>     When I try to do a long underscore __  for classes in Pycharm, it only gives me two separate single underscores _ _. This is only in Pycharm, no problems anywhere else. Could you tell me how to fix this, because I can?t find any answers on the web and I?m not sure if I can go any further in my learning without being able to get long underscores.
>    Sorry if I?m just being really dense, but like I said I?m an absolute beginner. Thanks for your time,
> Tony
> Sent from Mail<> for Windows 10
> --