#repr

2025-10-24

Random #python thing I just realized about f-strings. When interpolating a variable, you can append = to change the formatting to the repr version instead of the string version:

```
>>> from datetime import datetime
>>> now = datetime.now()
>>> f"{now}" #str() version
'2025-10-24 07:33:30.443638'
>>> f"{now=}" #repr() version
'now=datetime.datetime(2025, 10, 24, 7, 33, 30, 443638)'
>>>
```

2025-04-11

Что делает перечисления (enum) в Rust такими мощными?

На примерах попробую показать, почему enum в Rust это несколько больше, чем обычно принято считать. Рассмотрю расширенное использование enum в типовых ситуациях. Сразу забегая вперед скажу, что в рамках статьи я не затрагиваю паттерны и мэтчинг. Первое, что приходит в голову, когда речь заходит об enum , — это идея: «А давайте заменим все константы на enum ». :) Желание логичное, давайте на него посмотрим...

habr.com/ru/articles/899792/

#rust #enum #num_enum #перечисления #итераторы #repr #strum #try_from

2024-05-17

[Перевод] Разбираемся с паттерном REPR в ASP.NET Core

В этой статье мы рассмотрим паттерн проектирования REPR (request‑endpoint‑response — «запрос‑конечная_точка‑ответ»), как он упрощает разработку API и как его можно реализовать на C#.

habr.com/ru/companies/otus/art

#c# #паттерн_REPR #ASPNET_Core #REPR

Guillaume Gomezimperio@toot.cat
2023-10-16

The #repr(transparent)] attribute will not be displayed by default anymore in rustdoc since this PR.

You can find the conditions of display in the rustdoc book.

#rust #rustlang

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst