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

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

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

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

Сообщества

Настроить S2

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



Пишет LWN.net ([info]syn_lwnheadline)
@ 2020-04-29 16:51:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
[$] Improving Python's SimpleNamespace
Python's SimpleNamespace class
provides an easy way for a programmer to create an object to store values
as attributes without creating their own (almost empty) class. While it is
useful (and used) in its present form, Raymond Hettinger thinks it could
be better. He would like to see the hooks used by mappings
(e.g. dictionaries) added to the class, so that attributes can be added and
removed using either x.a or x['a']. It would bring
benefits for JSON handling and more in the language.


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