@isotopp Sowas nennt man nicht unintuitiv, dafür gibt es ein eigenen Begriff zu.
@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:
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'.
#TheMetalDogArticleList
#BraveWords
Exclusive: PYTHONIC Premieres “Liturgy” Single
https://bravewords.com/black-death/exclusive-pythonic-premieres-liturgy-single/
#PYTHONIC #Exclusive #Premieres #newrelease #single #EP #announcement #guitarist #BraveWords #metal #music
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:
https://soumyadghosh.github.io/website/interns/gsoc-2025/gsoc-pycups-is-intelligent/
Thanks @soumyadghosh
#OpenPrinting #Python #Pythonic #CFFI #CUPS #GSoC #GSoC2025
DumPy: Because embracing your inner dolt is the new #Pythonic way of life. 🤪📉 Want to run fast on #GPUs without a single brain cell firing? This is the #guide for you, where "thinking" is officially a deprecated feature. 😂🧠
https://dynomight.net/dumpy/ #DumPy #humor #fun #HackerNews #ngated
Ursina: Создание умных NPC через поведенческие деревья (Часть 2)
В первой части мы разобрали основы Ursina и создали простую 3D-игру. Теперь перейдем к более сложной механике — искусственному интеллекту для NPC с помощью поведенческих деревьев (Behavior Trees).
https://habr.com/ru/articles/898360/
#ursina_engine #ursina #python #python3 #python_3 #pythonic #python_class #python_tutor #game_development #gamedev
[Перевод] Чистый код в Python
Всем привет! Это перевод статьи Clean Code in Python . В данной статье Nik Tomazic рассказывает о чистом коде, его преимуществах, различных стандартах и принципах, но что самое главное– он дает общие рекомендации по написанию чистого кода. Прочитав данную статью в оригинале, я понял, что это именно то, что я хотел бы прочитать в самом начале своего пути разработки на Python. Именно это и вдохновило меня на создание первого перевода, а вместе с этим, и первой публикации на Хабре.
https://habr.com/ru/articles/877118/
#чистый_код_Python #PEP_8 #Pythonic #DRY #SOLID #форматирование_кода #модульность_в_Python #Дзен_Python #python
@villares @AlSweigart @nedbat
Thanks! Although it may be small, it's not exactly #Pythonic. I also just realized that it might not be very efficient. Maybe we should check with `timeit`.
@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 #Pythonic.
Простое управление настройками приложения в проекте на django
Как добавить кучу настроек для администратора в свой проект на django без дополнительных сервисов feature-toggle и потом в них не потеряться.
Paws, Pets, and Metal: Pythonic’s Morgan Warriner on his moshpit-loving dog and metal-hating cat:
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.
10 кубиков синтаксического сахара
В питоне очень много полезного и интересного синтаксического сахара. Настолько много, что у неподготовленных пользователей может случиться сахарный диабет. Здесь вы увидите несколько уникального для питона синтаксического сахара, его примеры правильного и неправильного применения.
https://habr.com/ru/articles/839558/
#синтаксический_сахар #синтаксис #языковые_конструкции #pythonic
#TheMetalDogArticleList #BraveWords Exclusive: Saskatoon’s PYTHONIC Premieres “Pills” Single bravewords.com/news/exclusi... #Pythonic #Saskatoon
#TheMetalDogArticleList
#BraveWords
Exclusive: Saskatoon’s PYTHONIC Premieres “Pills” Single
https://bravewords.com/news/exclusive-saskatoons-pythonic-premieres-pills-single