python

Back Open Paginator
21.08.2025 22:58
cheukting_ho (@cheukting_ho@fosstodon.org)

#PSF election #CallToAction: I want to give a shout out to two people that I appreciate in the #Python #community. Abigail Mesrenyame Dogbe and Sheena O'Connell (1/3)





Show Original Post


21.08.2025 22:56
mhsatman (@mhsatman@fosstodon.org)

python -X gil=[1, 0] is a new thing in Python 3.14.0rc2.

Result of

#> time ./python -X gil=1
509.92 millis

and

#> time ./python -X gil=0
196.85 millis

in my machine.

Sum: 12499997500000.0
Sum: 12499997500000.0
Sum: 12499997500000.0
All threads finished.

#Python :python:





Show Original Post


21.08.2025 22:51
ngate (@ngate@mastodon.social)

🚀 Behold! A groundbreaking revelation: "uv format" is here to make your code look pretty, but only if you're brave enough to experiment with it. Because, clearly, Python's real problem was the lack of a hipster code formatter. 🎉 Plus, a riveting tale of how sunsets Pytype—because who needs type checking when you can just YOLO your code? 🙄
pydevtools.com/blog/uv-format-




Show Original Post


21.08.2025 22:34
Rio (@Rio@mastodon.social)

Ce soir je dessine des petits cercles





Show Original Post


21.08.2025 22:23
ngate (@ngate@mastodon.social)

Ah, yes, the riveting tale of Python's pattern matching, where is the hero we neither need nor deserve 🤖🎩. Our protagonist repeatedly insists that subclasshook is the secret sauce to soup, even as the rest of us nod off into oblivion... because who doesn't love a good subclass definition story? 💤📚
hillelwayne.com/post/python-ab




Show Original Post


21.08.2025 22:23
h4ckernews (@h4ckernews@mastodon.social)

Crimes with Python's Pattern Matching (2022)

hillelwayne.com/post/python-ab

#2022




Show Original Post


21.08.2025 22:20
GripNews (@GripNews@mastodon.social)

🌘 Python 3.10 模式匹配與抽象基礎類別的黑暗藝術
➤ 揭露 Python 模式匹配的隱藏陷阱與邪惡潛能
hillelwayne.com/post/python-ab
本文深入探討 Python 3.10 新增的模式匹配功能,並與傳統的抽象基礎類別(ABC)中的 `__subclasshook__` 方法結合,揭示瞭如何利用這兩項機制實現出乎意料的行為。作者展示瞭如何透過自訂 `__subclasshook__` 來「劫持」模式匹配的類型檢查,甚至能影響物件解構的行為。文章更進一步介紹瞭如何組合自訂的 ABC 來實現邏輯運算(如 NOT、AND),並探討了 `__subclasshook__` 的快取行為及副作用的可能性。作者強調,雖然這些技巧極具創意且能帶來有趣的結果,但因其複雜性和潛在的不可預測性,應僅限於極端情況或實驗性用途,切勿用於日常協作程式碼。
+ 這篇文章真的讓我大開眼界!沒想到 `__subclasshook__` 和模式匹配結合起來可以玩出這麼多花樣,尤其是 `Not




Show Original Post


21.08.2025 22:13
CuratedHackerNews (@CuratedHackerNews@mastodon.social)

Crimes with Python's Pattern Matching (2022)

hillelwayne.com/post/python-ab




Show Original Post


21.08.2025 22:04
thomy2000 (@thomy2000@fosstodon.org)

I just discovered that #Python let's you dynamically create functions at runtime and now I dislike the language even more.

I'm sitting there wondering why the language server isn't showing me a function that is *literally in their README* and that also works when called. I look through the library source files and can't find the function definition anywhere. Then I notice a comment that says "create the functions dynamically".

Awful language.




Show Original Post


21.08.2025 22:00
pybay (@pybay@fosstodon.org)

🐍 PyBay 2025 is back Oct 18 in San Francisco! Great talks, great community, and plenty of Python energy.

🎟️ Tickets: pretix.eu/bapya/pybay-2025/
🎤 Talks: pybay.org/speaking/talk-list-2

#Python #PyBay





Show Original Post


21.08.2025 21:51
encbladexp (@encbladexp@chaos.social)

Immer spannend zu sehen das Menschen noch kein collections.Counter in Python kennen.

Ich hab den Eindruck die Leute schauen einfach nicht in die Dokumentation der stdlib, und nehmen irgendwas von Stackoverflow oder GPT.

#python




Show Original Post


21.08.2025 21:23
dimpase (@dimpase@mathstodon.xyz)

python packaging is a nightmare, part $n+1$
#python #meson

github.com/mesonbuild/meson-py




Show Original Post


1 ...1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 ...1547
UP