FW: Pycharm Won't Do Long Underscore

2020-06-23 Thread Tony Kaloki



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Tony Kaloki<mailto:[email protected]>
Sent: 23 June 2020 19:45
To: [email protected]<mailto:[email protected]>
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<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Tony Kaloki
Alexander,
   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.
Tony

Get Outlook for Android<https://aka.ms/ghei36>


From: Alexander Neilson 
Sent: Tuesday, June 23, 2020 9:28:37 PM
To: Tony Kaloki 
Cc: [email protected] 
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.

Regards
Alexander

Alexander Neilson
Neilson Productions Limited
021 329 681
[email protected]

> On 24/06/2020, at 07:57, Tony Kaloki  wrote:
>
> 
>
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>
> From: Tony Kaloki<mailto:[email protected]>
> Sent: 23 June 2020 19:45
> To: [email protected]<mailto:[email protected]>
> 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<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Pycharm Won't Do Long Underscore

2020-06-24 Thread Tony Kaloki
Thanks for all your explanations, everyone. Hopefully, I'll know better next 
time I come across a similar case. Now, to try and understand the rest of 
Python...

Get Outlook for Android<https://aka.ms/ghei36>


From: Python-list  on behalf 
of MRAB 
Sent: Wednesday, June 24, 2020 7:28:52 PM
To: [email protected] 
Subject: Re: Pycharm Won't Do Long Underscore

On 2020-06-24 18:59, Chris Angelico wrote:
> On Thu, Jun 25, 2020 at 3:51 AM Dennis Lee Bieber  
> wrote:
>>
>> On Tue, 23 Jun 2020 20:49:36 +, Tony Kaloki 
>> declaimed the following:
>>
>> >Alexander,
>> >   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?
>>
>> There is no "long underscore" in the character set. If there were,
>> Python would not know what to do with it as it was created back when ASCII
>> and ISO-Latin-1 were the common character sets. (Interesting: Windows
>> Character Map utility calls the underscore character "low line").
>
> That's what Unicode calls it - charmap is probably using that name.
>
>> Many word processors are configured to change sequences of hyphens:
>> - -- --- into - – — (hyphen, en-dash, em-dash)... But in this case, those
>> are each single characters in the character map (using Windows-Western,
>> similar to ISO-Latin-1): hyphen is x2D, en-dash is x96, em-dash is x97
>> (note that en-/em-dash are >127, hence would not be in pure ASCII)
>
> Hyphen is U+002D, en dash is U+2013, em dash is 2014. :)
>
Not quite. :-)

Hyphen is U+2010.

U+002D is hyphen-minus; it's does double-duty, for historical reasons.
--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list