home.social

#dataclass — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #dataclass, aggregated by home.social.

  1. Pydantic V2: Почему dataclasses вам ещё больше нужны

    На написание статьи меня сподвигла статья «Pydantic V2: Почему dataclasses вам больше не нужны» и меткий комментарий : «Спасибо за статью, но мне кажется Вы учите детей плохому. » Давайте попробуем разобраться, почему и датаклассы хороши, и pydantic V2 прекрасен, а вместе – они становятся ещё лучше. Или устроить смешанное единоборство?

    habr.com/ru/articles/970648/

    #python #pydantic #dataclass #perfomance #никто_не_читает_теги #разработка #длинное_тире_сам_поставил #производительность #fastapi

  2. Атрибут или Dunder-метод slots в Python. Что нужно о нём знать?

    Всем привет! Меня зовут Дима. Я являюсь Backend Python Developer'ом. Сегодня расскажу Вам про «волшебный» инструмент __slots__ в Python.

    habr.com/ru/articles/884052/

    #python #slots #__slots__ #dunder #dunder_methods #class #dataclass

  3. How do you generate JSON schemas of your dataclasses' **inputs**? Any third-party library (something else than stdlib's dataclasses) allowing one to do that?

    For example, input type is `int | str`, but final/output type is always `int` (coerced). I want to document the input type, not the output type.

  4. So, zusätzlich zum Location-Tracking für mein Telefon über die #Nextcloud-App #PhoneTrack hab ich das jetzt auch mal mit einem in #Python zusammengefrickelten #GPSD-Client auch meinem #Wohnmobil beigebracht.

    codeberg.org/scy/jessie/commit

    Viel Liebe für #dataclass und #deque.