Python also partially disclaims the terms master / slave

    Political correctness is taken into account even in programming languages. Last week, Python-developer Victor Stinner (Victor Stinner) from Red Hat sent four pull requests for renaming potentially offensive master / slave terms in the documentation and Python code. The author proposed replacing them with socially neutral words that do not offend people whose ancestors were real slaves. As a possible alternative, there are terms parent / worker.

    The proposed change is not a whim of a single developer, but a general trend for different programming languages ​​and technologies. Steener gave examples of similar changes in Redis , Drupal , CouchDB and Django.. So, Django and CouchDB have replaced the terms master / slave with leader / follower.

    At the same time, Steener expressed the opinion that the “slave-owning” terminology can still be left for some terms, such as the master branch in Git, the webmaster and the postmaster.

    A heated discussion ensued.

    A search on the python / cpython codebase finds numerous inclusions of “offensive” terms master and slave next to each other, including in the pty and openpty libraries.

    For example, here is the Lib / code :

    CHILD = 0defopenpty():"""openpty() -> (master_fd, slave_fd)
        Open a pty master/slave pair, using os.openpty() if possible."""try:
            return os.openpty()

    Victor Steener says that “there were complaints” about such terminology, but they spoke privately, not publicly, to avoid swearing.

    In discussing the problem, colleagues note that the Python documentation does not duplicate the Linux documentation — namely, from there comes the use of master / slave terms for many functions. Thus, if you agree to rename only for Python, then this will lead to a deviation from the generally accepted standard Linux. Roughly speaking, the Python and Linux documentation will describe the same functions in different words. Colleagues suggest discarding changes to the “secondary” Python documentation until such changes are made to the Linux documentation.

    The attention of developers is primarily attracted to such areas of code and terminology, where the words "master" and "slave" are found next to each other. If master is mentioned in isolation, then these fragments can be left intact. For example, in the doctest module there is a designation doctest.master:

    # For backward compatibility, a global instance of a DocTestRunner# class, updated by testmod.
    master = None

    According to Victor Steener , this does not look too offensive.

    The author has found many cases in which “humiliating vocabulary” is mentioned. For example, in nntplib.NNTP () there is a slave () method that sends a slave command to the server. This fix will require changes to the NNTP protocol, namely Section 3.12 (the SLAVE command) , writes Stinner.

    Another example is the mbuf.master attribute of the PyMemoryViewObject object in the C APIs:

    typedefstruct {
        int flags;          /* state flags */
        Py_ssize_t exports; /* number of direct memoryview exports */
        Py_buffer master; /* snapshot buffer obtained from the original exporter */
    } _PyManagedBufferObject;
    /* memoryview state flags */#define _Py_MEMORYVIEW_RELEASED    0x001  /* access to master buffer blocked */#define _Py_MEMORYVIEW_C           0x002  /* C-contiguous layout */#define _Py_MEMORYVIEW_FORTRAN     0x004  /* Fortran contiguous layout */#define _Py_MEMORYVIEW_SCALAR      0x008  /* scalar: ndim = 0 */#define _Py_MEMORYVIEW_PIL         0x010  /* PIL-style layout */typedefstruct {
        _PyManagedBufferObject *mbuf; /* managed buffer */
        Py_hash_t hash;               /* hash value for read-only views */int flags;                    /* state flags */
        Py_ssize_t exports;           /* number of buffer re-exports */
        Py_buffer view;               /* private copy of the exporter's view */
        PyObject *weakreflist;
        Py_ssize_t ob_array[1];       /* shape, strides, suboffsets */
    } PyMemoryViewObject;

    In general, master and slave are literally everywhere. Victor Stinner suggested a series of patches that fix the situation in some places. Thus, in Python version 3.8, master / slave terms will be less common.

    Theoretically, in some cases, the problem can be solved without abandoning the well-established terminology. For example, the Redis developers have proposed an original way out of the situation: since version 1.0.0, the SLAVEOF NO ONE command is supported there , which turns the slave server into a master server. Worse, if the corresponding changes in the syntax require power. Prerequisites for this are already there. For example, in 2003, the Los Angeles County Department of Internal Services Procurement Division sent a notice to electronics and home appliances manufacturersasking to avoid the master / slave terms in the description of their products.

    In 2004, the Global Language Monitor monitoring group called master / slave the most politically incorrect term of the year. In the technology industry, these words have been used for a very long time and have become part of numerous standards, including RFC 977 from 1986.

    Regarding the pull requests of Victor Steener, disputes began that completely reflect the arguments of staunch opponents and supporters of political correctness - such disputes are being held in various forums. The end of the discussion was put by Guido van Rossum himself, who has formally retired, but looks after his brainchild Python. He is sordjilthree of the four proposed pull requests, and the fourth rejected, because it reflects the original pty terminology from UNIX.

    Note that “offensive” terminology has become a part of the modern language for historical reasons and it is unlikely that you can get rid of it. For example, David Greber, in his book Debt: The First 5,000 Years of History, gives an example of the concepts “dominium” (dominium) and “familia” (family):

    As for the concept of “dominium”, it comes from the word “dominus”, which means “master” or “slave owner”, but goes back to the word “domus”, i.e. “house” or “household”. Associated with this is the English term “domestic” (“domestic”), which even today can be used to mean “private” or to designate a servant cleaning a house. “Domus” echoes the word “familia”, i.e. “family”, but “familia” comes from the word “famulus”, i.e. “slave”. Initially, the family was understood as all the people who were under the household power of “pater familias”, which was, at least in early Roman law, absolute.

    The man did not have complete authority over his wife, since to some extent she still remained under the protection of his father, but with children, slaves, and other dependent people he could do whatever he wanted - in any case, in early Roman law he was free to flog them, torture or sell them. A father could even execute his children if he found out that they had committed a serious crime. And if it was a matter of slaves, he didn’t need this excuse either.

    Creating the concept of "dominium", which formed the basis of the modern principle of private property, Roman lawyers turned to the principle of domestic power, full power over people, identified some of these people (slaves) as things, and then spread the logic that was originally applied to slaves, geese, chariots, barns, jewelery boxes, etc., that is, on any thing related to law.

    That is, even the words "family", "last name" or the concept of private property can be considered politically incorrect by the following logic: they all relate to slavery. These concepts entered modern languages ​​with many words, about the origin of which people usually do not think about. There is a reason to be offended by the Slavs .

    “It is very politically incorrect to assign types to objects before they are created!

    We should not impose on objects what they should be and who should not be.

    The object itself can decide what type it is, right in runtime. Moreover, he has the right to change his type if he feels for this inner disposition.

    Segregation of objects according to their type should be prohibited at the legislative level, until it becomes the interned social norm of each coder.

    Equal opportunities should be guaranteed to all objects at the level of the operating system and equal rights are given on demand.

    While the systems are far from perfect, it is worthwhile to provide in them mandatory quotas for objects of each type and to monitor their strict observance ”.

    - commentfukkit

    Also popular now: