On 2020-06-24 13:48:18 -0400, Dennis Lee Bieber wrote:
> On Tue, 23 Jun 2020 20:49:36 +0000, Tony Kaloki <tkal...@live.co.uk>
> 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.

There is U+FF3F Fullwidth Low Line.

> If there were, Python would not know what to do with it

You can use it in variable names, but not at the beginning, and it isn't
equivalent to two underscores, of course:

    Python 3.9.0b3 (default, Jun 13 2020, 10:49:29)
    [GCC 7.5.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> _ = 12
      File "<stdin>", line 1
        _ = 12
        ^
    SyntaxError: invalid character '_' (U+FF3F)
    >>> a_ = 12
    >>> a_
    12
    >>> a__
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'a__' is not defined
    >>>

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | h...@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature

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

Reply via email to