scalar vs array and program control
Thomas 'PointedEars' Lahn
PointedEars at web.de
Sun Jul 26 12:35:53 CEST 2015
Thomas 'PointedEars' Lahn wrote:
> Laura Creighton wrote:
>> and to create a class where none was before to make it more object-
> I did not need to, but, again, it was more obvious that way. I could also
> have used an existing class, and its existing or newly added method.
> AISB, almost everything in Python is an object; therefore, almost
> everything in Python has a class (try “print((42)).__class__)” in Py3k).
| >>> print((42).__class__)
| <class 'int'>
Most interesting (but understandable):
| >>> print(42..__class__)
| <class 'float'>
BTW, another common misconception that I read from your argument is that
“object-oriented” would be synonymous with “class-based”; that one needs a
class for OOP. In fact, however, there are several object-oriented
programming languages, again for example most ECMAScript implementations,
that are prototype-based: one object/instance inherits from another, its
Please do not cc me. / Bitte keine Kopien per E-Mail.
More information about the Python-list