#pythonic

Saupreiss #Präparat500 🗽Saupreiss@pfalz.social
2026-01-19

@isotopp Sowas nennt man nicht unintuitiv, dafür gibt es ein eigenen Begriff zu.

#pythonic #shitpost

2026-01-10

@JessTheUnstill
I'm working on a programming language, going by the name of #Rocket.

It's supposed to be #Pythonic, but compilable.
Concretely, that means you can modify types, modules, etc. at compile time (e.g. inject another method into a class, replace a method with a wrapped one, create a class dynamically, etc.), but not at runtime.

Still in the early stages, though :blob_grinning_sweat:

2026-01-07

I am "#Python is the batteries-included language, unlike Perl or TCL!" years old, and that has aged like a prawn cocktail. The standard library is chok full of awkward "un-#Pythonic" legacy code that only exists because changing it would break backward-compatibility.

But Python 3.0 *gleefully* broke backward-compatibility! They broke `print "Hello, world."` which is the most-written Python code in history!

So for my money, Python 4.0 should be a release that gets rid of boat anchors like HTTPlib, and pushes that stuff into a `from deadbatteries import ...` compatibility library for the folks who absolutely need it.

You could do statistical analysis of `requirements.txt` files out on the Internet and see what replaces-the-horrible-stdlib-version packages are imported the most. You can then mainline the winning replacements, or figure out what APIs or features everyone is reaching for when they import some new dependency and reimplement that. It doesn't matter if you NIH it, re-do the API on existing library code, or promote a third-party project to Python core library status.

Python's dependency resolution tooling is not just a mess: it's a dozen independently-maintained messes that compound the problem. I want to go back to being able to actually rely on the standard library. I do my best now, but the level of jank is only getting worse as the years drag on, and that prawn cocktail is absolutely pongin'.

El Pregoner del Metallpregonermetall
2025-12-19

this is neither genuine #python nor #pythonic code ;) #Qoder #Apsara

Till Kamppetertill@ubuntu.social
2025-08-24

For the Python programmers under you who wanted to make your app print, you probably have used pyCUPS to talk with the printing system. Perhaps you have also seen that it is not well maintained, not keeping pace with new APIs. Problem was its design, being a maintenance nightmare.

But for libcups3 it gets much better, thanks to the most Pythonic GSoC contributor we ever had, and CFFI:

soumyadghosh.github.io/website

Thanks @soumyadghosh

#OpenPrinting #Python #Pythonic #CFFI #CUPS #GSoC #GSoC2025

N-gated Hacker Newsngate
2025-05-24

DumPy: Because embracing your inner dolt is the new way of life. 🤪📉 Want to run fast on without a single brain cell firing? This is the for you, where "thinking" is officially a deprecated feature. 😂🧠
dynomight.net/dumpy/

2025-04-07

Ursina: Создание умных NPC через поведенческие деревья (Часть 2)

В первой части мы разобрали основы Ursina и создали простую 3D-игру. Теперь перейдем к более сложной механике — искусственному интеллекту для NPC с помощью поведенческих деревьев (Behavior Trees).

habr.com/ru/articles/898360/

#ursina_engine #ursina #python #python3 #python_3 #pythonic #python_class #python_tutor #game_development #gamedev

2025-01-27

[Перевод] Чистый код в Python

Всем привет! Это перевод статьи Clean Code in Python . В данной статье Nik Tomazic рассказывает о чистом коде, его преимуществах, различных стандартах и принципах, но что самое главное– он дает общие рекомендации по написанию чистого кода. Прочитав данную статью в оригинале, я понял, что это именно то, что я хотел бы прочитать в самом начале своего пути разработки на Python. Именно это и вдохновило меня на создание первого перевода, а вместе с этим, и первой публикации на Хабре.

habr.com/ru/articles/877118/

#чистый_код_Python #PEP_8 #Pythonic #DRY #SOLID #форматирование_кода #модульность_в_Python #Дзен_Python #python

Mr. Lance E Sloan (IRL) 👤sloanlance
2025-01-15

@villares @AlSweigart @nedbat
Thanks! Although it may be small, it's not exactly . I also just realized that it might not be very efficient. Maybe we should check with `timeit`.

Mr. Lance E Sloan (IRL) 👤sloanlance
2025-01-14

@AlSweigart @nedbat You inspired me to hack a way to ensure `a`, `b`, and `c` are distinct. I came up with…

```
len(set((a, b, c))) == 3
```

I suspect that's bordering on obfuscated code. Probably not .

2024-12-24

Простое управление настройками приложения в проекте на django

Как добавить кучу настроек для администратора в свой проект на django без дополнительных сервисов feature-toggle и потом в них не потеряться.

habr.com/ru/articles/869432/

#настройки #конфиги #python #pythonic #featuretoggle

2024-11-06

@AliveDevil

Oof. Yes, this code

> if self._unique_id == 'none':

is glaringly un-#Pythonic to this reader.

I venture to say it's even a mistake, because the only place that attribute gets set is earlier:

> self._unique_id = kwargs.get('unique_id')

which will return the `None` object if 'unique_id' is not in `kwargs`.

So that conditional test should just be using the normal Pythonic:

> if self._unique_id is None:

Which is why the `dict.get` method returns `None` when the key isn't found.

2024-10-16

Ok, my new mission is convincing #rstats people, especially those involved with @rOpenSci, that they are indeed research software engineers and that they should get involved in the disproportionately #pythonic (in my opinion) @us_rse

2024-08-29

10 кубиков синтаксического сахара

В питоне очень много полезного и интересного синтаксического сахара. Настолько много, что у неподготовленных пользователей может случиться сахарный диабет. Здесь вы увидите несколько уникального для питона синтаксического сахара, его примеры правильного и неправильного применения.

habr.com/ru/articles/839558/

#синтаксический_сахар #синтаксис #языковые_конструкции #pythonic

#TheMetalDogArticleList #BraveWords Exclusive: Saskatoon’s PYTHONIC Premieres “Pills” Single bravewords.com/news/exclusi... #Pythonic #Saskatoon

🤘 The Metal Dog 🤘TheMetalDog
2024-08-16
2024-06-05
if you are taking python interview for a 4-5+ yr experience developer wiho has all the modern fancy packages listed out in their CV but they can't write good #pythonic code with just the language and no external dependencies... #aita? for never asking textbook questions but creating simple coding exercises which require no leet level algorithms etiher? not a single candidate went through without struggling. i have stopped believing in the fancy packages they are putting in python developer CVs.

Client Info

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