Simple question - end a raw string with a single backslash ?

Chris Angelico rosuav at gmail.com
Mon Oct 19 02:52:38 EDT 2020


On Mon, Oct 19, 2020 at 5:26 PM Mladen Gogala via Python-list
<python-list at python.org> wrote:
> bless \$ref will make the given reference a reference to the class. And classes is Perl
> are called "modules". However, Perl classes are not the classes in the  real sense. There
> is no inheritance. You can have a similar thing in C: it's called "struct", it can do
> similar things like Perl modules. But C isn't object oriented. Inheritance is an
> essential characteristic of object orientation.

Funny thing about how languages "are" or "are not" object oriented....
back in the day, I used to do SOM programming on OS/2, which was
entirely in C, and most definitely had all the features you'd expect
of object orientation. Inheritance, the ability to override your
parent's methods, the ability to call the parent's method during the
implementation of your own, etc, etc, etc. It was all done through
DLLs, so you could subclass someone else's class (a very common thing
was to subclass one of the standard classes and add a small amount of
functionality to it) without having the source code. So, yeah, I don't
think there's any fundamental in any language that says whether or not
you can do OOP.

There are features which make OOP easier, and some languages have more
of them than others do. That's about all you can really say.

ChrisA


More information about the Python-list mailing list