Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет LWN.net ([info]syn_lwnheadline)
@ 2021-03-24 22:32:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
[$] Extending Python's enums
Enumerated types or "enums" are a feature of many languages, including
Python; enums provide a convenient way to collect up a bunch of related
symbols that (typically) evaluate to integer values. The canonical example
would seem to be for colors, at least for demonstration purposes, but there are
others, especially for handling "magic" constants from source likes POSIX
or the host operating system. A recent thread on the python-ideas mailing list discusses
different ways to add a new feature to enums—seven years after they were
added to the standard library as part of
Python 3.4
.


(Читать комментарии) (Добавить комментарий)