Text representations of Python objects (Text representations of Python objects), lesson, page 724607
https://www.purl.org/stefan_ram/pub/text_representations_python (permalink) is the canonical URI of this page.
Stefan Ram
Python Course

>724275 Textdarstellungen von Python -Objekten

Text representations of Python  objects

It is not  possible to output an object directly, because an object is not text. For this reason, in order to output an object, a text representation of the object is created. This text representation  is a text representing the object and can then be output. The process of the production of a text representation will also be called text representation.

When an expression is entered into the console, it is being evaluated. After the evaluation of the entered expression, a text representation  of the object obtained is output.

Evaluation in the console
"Hello, world!"
'Hello, world!'

The expression »"Hello, world!"« is evaluated  above. The evaluation results in an object. The text representation  of that object is then »'Hello, world!'«.

The text representation of an object is normally used whenever this object is to be output  on a text medium.

Evaluation of the expression »"Hello, world!"« and text representation of the object obtained

evaluation text representation
"Hello, world!" --------------------> Hello, world! -------------------------> 'Hello, world!'
Expression object text representation

a text not a text a text

Evaluation of an expression with subsequent text representation of the object obtained
                     evaluation           text representation
expression --------------------> object ---------------------> text representation

A text representation of an object often does not contain all  information about the object.

The term “text representation of an object ” belongs to the run-time model.

 

About this page, Impressum  |   Form for messages to the publisher regarding this page  |   "ram@zedat.fu-berlin.de" (without the quotation marks) is the email address of Stefan Ram.   |   A link to the start page of Stefan Ram appears at the top of this page behind the text "Stefan Ram".)  |   Copyright 1998-2020 Stefan Ram, Berlin. All rights reserved. This page is a publication by Stefan Ram. relevant keywords describing this page: Stefan Ram Berlin slrprd slrprd stefanramberlin spellched stefanram724607 stefan_ram:724607 Text representations of Python objects Stefan Ram, Berlin, and, or, near, uni, online, slrprd, slrprdqxx, slrprddoc, slrprd724607, slrprddef724607, PbclevtugFgrsnaEnz Explanation, description, info, information, note,

Copyright 1998-2020 Stefan Ram, Berlin. All rights reserved. This page is a publication by Stefan Ram.
https://www.purl.org/stefan_ram/pub/text_representations_python