1

There exist some people who have difficulty learning the Python programming language and some people who do not have such difficulties.

When teaching students, it's useful to explain that the Python function having the name repr uses an abbreviation of the English word representation.

What is a useful noun or verb, for the word representation?

Specifically, within the context of Python programming, the word "representation" has a meaning which is an amalgamation of the following phrases:

  • "write this down in notation some words and punctuation marks which can be used to rebuild the object tomorrow, next month, or at a future time.".

  • "represent the data in human-readable text"

Some people might vote to close my question because there's debate among computer programmers as to whether text for people to read should be unabridged (verbose) or abridged (shortened).


I've usually read that:

  • str (string) is used for abbreviated text.

  • repr (representation) for saving data as unabridged, full, entire, passages of text.

In this post, I'm more interested in Russian words older children would understand for representation.

Russian words can always be compiled by computers into abbreviations of English words. The python interpreter requires standardized abbreviations of English words.

However, if it assists in translation, optional reading is provided here:

English Documentation for repr(объект)

At least one Russian word or phrase for writing might be sufficient; I'll let the voting system on Stack Exchange be the judge of which word for representation is the best to use in the context of computer programming and representations of data.

3
  • 1
    Your link to the English documentation is broken
    – Quassnoi
    Jun 9 at 23:28
  • @Quassnoi I don't know who corrupted the link I provided, but I have fixed it. The link to the python documentation on representation (abbreviated as repr ) is here Jul 29 at 16:39
  • @SamuelMuldoon: we're ok with you keeping two separate accounts, as long as they don't interact in a way that affects their reputation. It looks like you want to edit a post on one of the accounts you control using the other account. This will result in a reputation gain and doing that is frowned upon. You might want to merge your accounts. Please let me know which of your accounts you want to keep as the main one. Thank you!
    – Quassnoi
    Jul 29 at 20:15

4 Answers 4

2

There exist two Russian words for "representation": представление (a calque from Latin) and репрезентация (a borrowing from Latin).

Представление is used to convey most of the meanings of the English word, but it has a lot of other meanings as well: "presentation, performance, introduction, imagination, view", just to name a few. There are some areas that use the borrowing репрезентация instead, for additional clarity. Software development is not one of them.

Programming languages, as a rule, stick to one human language for naming (or drawing inspiration for naming) their objects and constructs, and for most languages, Python included, this language has long since happened to be English.

I know of one major programming language — the functions subsystem in MS Excel — which uses localized object names. In my personal opinion, shared by virtually everyone I've been talking about on this topic, it's a terrible idea. Words like ДОХОДКЧЕК or БДПРОИЗВЕД have absolutely no meaning in Russian (and neither do their English counterparts TBILLYEILD or DPRODUCT in English), so their names give you absolutely no hint as to their meaning. You'll have to look them up anyway, except that you can't; they're not mentioned in English articles and tutorials. You'd have to look up their English counterparts first. Back in the day, it was a challenge; offline Microsoft documentation didn't provide the correspondence tables, so enthusiasts maintained and distributed their own software (and later websites) to translate the Excel formulas and function names between localized versions of Excel.

To answer your question, the name of the concept that lies behind the Python function repr is conveyed in Russian as представление, but it has many more meanings than English "representation". If your idea is to mechanically replace this word in intellisense, menus or other places that don't offer a lot of context, I doubt it's gonna work well.

The Russian name for the Python function repr is repr, the same as in any other world language.

2

I'm into hard sciences, so the value of my answer may be limited.

What I can say for sure is that in both physics and mathematics, "representation" is always unambiguously translated as "представление".

In physics, the "Schroedinger representation" and "Heisenberg representation" are translated as "представление Шрёдингера" and "представление Гейзенберга", correspondingly.

In mathematics, "representations of groups" and "representations of algebras" are translated as "представления групп" and "представления алгебр", respectively.

PS.
In their answer, Quassnoi mentions the word "репрезентация" as a borrowing from Latin.
In hard sciences, this term is not in use.

2
1

It is called "представление" in mathematics, and that is the term I and my fellow software engineers are using.

4
  • Ideally, there will exist a programming language in the next 50 years such that users of that programming language can type (1 repr) or type (2 representation) or type (3 представление) or any non-empty sub-sequence of представление provided that there not exist two or more objects in the current scope workspace sharing the same sub-sequence. Ideally, computer programmers and app developers will be allowed to type. When using Linux I sometimes write makdr instead of mkdir. Please observe that mkdir and makdr are both sub-sequences of the string make directory. Jul 29 at 16:45
  • wrote memorization of abbreviations of English phrases distracts from the real interesting parts of the work. mkdir is an abbreviation of make directroy. In BASH script chmod is an abbreviation of change mode. repr is an abbreviation of representation. ord("B") is an abreviation of ordinal("B"). There will exist a language in the future which allows more than one abbreviation and stores them in a tree data-structure. ord is a sub-sequence of ordinal. Function declarations and definitions shall be full Russian, English, German, Manderin, Hangul, or Spanish phrases Jul 29 at 16:48
  • function calls (invocations) in a futuristic programming language may be any subsequence of the function label or function name. The function name and/or function label are created when a function is declared and/or the function is first defined. Thereafter, any subsequence of the function name may be used. In future Linux shell scripts born after the born again shell (BASH) then we can make it so that after a function named make_directory is defined, we may write mkdir or makdr or any subsequence of make_directory. Jul 29 at 16:52
  • The comments I posted earlier could assist persons uncomfortable with the English language in computer programming. Also, we may assist students fluent in English who are learning computer programming for the first time. Those familiar with English might have an easier time remembering the phrase make_directory rather than remembering hundreds of strangely named Linux commands or python language keywords. Jul 29 at 16:53
1

If I understand correctly that the question is 'how to translate or describe Python's repr() semantics (for the not-so-advanced audience), then I suggest you translate it as

описание

The official documentation tells us:

Return a string containing a printable representation of an object.

So, repr() converts an object to its description.

(And in some cases, it's possible to load this description back into eval(), yes.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.