#dataclass — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #dataclass, aggregated by home.social.
-
Pydantic V2: Почему dataclasses вам ещё больше нужны
На написание статьи меня сподвигла статья «Pydantic V2: Почему dataclasses вам больше не нужны» и меткий комментарий : «Спасибо за статью, но мне кажется Вы учите детей плохому. » Давайте попробуем разобраться, почему и датаклассы хороши, и pydantic V2 прекрасен, а вместе – они становятся ещё лучше. Или устроить смешанное единоборство?
https://habr.com/ru/articles/970648/
#python #pydantic #dataclass #perfomance #никто_не_читает_теги #разработка #длинное_тире_сам_поставил #производительность #fastapi
-
Атрибут или Dunder-метод slots в Python. Что нужно о нём знать?
Всем привет! Меня зовут Дима. Я являюсь Backend Python Developer'ом. Сегодня расскажу Вам про «волшебный» инструмент __slots__ в Python.
https://habr.com/ru/articles/884052/
#python #slots #__slots__ #dunder #dunder_methods #class #dataclass
-
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.
-
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.
https://codeberg.org/scy/jessie/commit/3471dd21b65d4a254b0facaf77dee1f189a3b536
Viel Liebe für #dataclass und #deque.