tushar.pyc
tush.ar
tushar.pyc
@tush.ar
Metaprogramming • Python / Zig / DevTools guy
w
December 29, 2024 at 2:08 PM
this is horrifying, and I doubt I could help, but do let us know when you have a solution!
December 2, 2024 at 4:25 PM
why not just .split()
December 2, 2024 at 4:15 PM
building a fully complaint python parser for fun
December 2, 2024 at 4:15 PM
i still prefer the first one. and i believe abspath is unnecessary starting from python 3.10 or something?

removing abspath also means you never touch the filesystem for this line of code so it'll be significantly faster too.
November 27, 2024 at 5:44 AM
this reminds me of pep 718: peps.python.org/pep-0718

While library maintainers would love this feature, I wonder what impact it will have on beginners when they accidentally do response.json["data"] instead of response.json()["data"], and instead of Python erroring, it gives a weird return value.
PEP 718 – Subscriptable functions | peps.python.org
This PEP proposes making function objects subscriptable for typing purposes. Doing so gives developers explicit control over the types produced by the type checker where bi-directional inference (whic...
peps.python.org
November 26, 2024 at 7:04 PM
This perfectly shows how every language feature has a significant cost. In this case, Python choosing every runtime value (including function objects) to have a truth value (being True for most stuff) means errors like this can slip by.

I wonder what Python would look like without "truthiness".
November 26, 2024 at 6:29 PM
Reposted by tushar.pyc
and now we put a bow on it: @python.org
November 26, 2024 at 2:28 PM
okay i need to try that next time!
November 24, 2024 at 4:31 PM
they serve bentos on the shinkansen??
November 24, 2024 at 1:04 PM