On 2020-06-24 13:48:18 -0400, Dennis Lee Bieber wrote:
> On Tue, 23 Jun 2020 20:49:36 +0000, Tony Kaloki <tkaloki(a)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.
|_|_) | |
| | | hjp(a)hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
I have quite a bit of experience with various programming languages,
including python, C, C++, and lisp. But I very rarely work on projects
that use interoperability. This is something that I'd like to learn more
about.
Sometimes, for numerical computing, I use cython as a binding layer
between C++ and python, but that's the extent of my experience. I'm
under the impression that if one were to want to use something like lisp
(like say ecl embeddable common lisp), C, and python together, the
process boils down to writing a lot of wrappers in C. And more
generally, C is a frequent lowest-common-denominator language. Is my
understanding right?
- DLD
--
David Lowry-Duda <david(a)lowryduda.com> <davidlowryduda.com>