Live data from Hacker News

Python 3.12

python.org

241–250 of 344 posts

Re: Python 3.12

#241

Earlier quoted context omitted.

There certainly is an equivalent of NIMBY in Western asylum politics. A lot of Green/Progressive voters in Western Europe live in affluent neighbourhoods where practical effects of current migration waves are very limited, and often positive (e.g. cheap workforce for your household, but your kids' school does not suffer from any gang activity). Voting patterns across income groups tend to reflect that discrepancy.

That seems to misrepresent reality. Generally speaking in all elections that I am aware off, rural regions are leaning right while urban regions are leaning left. In fact in general it seems anti-immigration/foreigner stances are almost anti-proportional to the number of immigrants/foreigners a person might encounter during their day. Just 2 counter examples (anecdotes but I'm sure a bit of searching will reveal numb…

> In fact in general it seems anti-immigration/foreigner stances are almost anti-proportional to the number of immigrants/foreigners a person might encounter during their day.

Maybe rurals are well aware of what's happening in urban regions and don't want it ? Maybe these people like their environment as it is and see no point in change ? I don't know, just guessing. :-)

Re: Python 3.12

#242

Earlier quoted context omitted.

> Maybe now I'll be able to actually figure out what data to send libraries without actually reading their source code. One could hope, but any library abusing kwargs in all their methods is showing they’re willing to go through the absolute minimum to make their code usable, let alone readable and self-documenting.

It feels like we're going in cycles. C was somewhat lax with type checking, thus C++ and Java were both made more strict. Looking to escape the tyranny of static typing, the rise of Python, Ruby, or JavaScript instead left us with a desire that Rust, Go, and TypeScript now fulfill. I wonder what's the next step? LLMs are extremely broad in what they accept, but don't exactly fill the same niches.

Nim/Julia, IMO.

However....

Nim is unlikely to go mainstream. It's not the next Rust and not for technical reasons.

Julia won't budge Python out of the top slot anytime soon, although it should in many scenarios past simple scripting.

Re: Python 3.12

#243

I'm just happy for itertools.batched for chunking iterables: https://docs.python.org/3.12/library/itertools.html#itertool...

Great call-out! (Mistakes elided..)

What do you mean by "empty sequence in"? The function doesn't raise if the input iterable is empty: it only raises if the chunk size n is 0. While that does have a natural interpretation of returning an infinite sequence of empty tuples, such a behavior would be qualitatively different than for other chunk sizes. The caller would never be able to retrieve any elements from the input iterable, and the output would be infinite even if the input is finite. In that light, it makes some sense (IMO) to avoid letting applications hit such an edge case unintentionally.

Re: Python 3.12

#244
post #149

Earlier quoted context omitted.

It feels like we're going in cycles. C was somewhat lax with type checking, thus C++ and Java were both made more strict. Looking to escape the tyranny of static typing, the rise of Python, Ruby, or JavaScript instead left us with a desire that Rust, Go, and TypeScript now fulfill. I wonder what's the next step? LLMs are extremely broad in what they accept, but don't exactly fill the same niches.

I'm holding out hope for a Fortran resurgence. It's a tiny hope. But a hope nonetheless. Fortran is fun.

What does a modern Fortran bring that Julia does not? Small binaries?

Re: Python 3.12

#245

I'm just happy for itertools.batched for chunking iterables: https://docs.python.org/3.12/library/itertools.html#itertool...

Yes. I’ve written explicit code that needed this 100s of times.

Yeah I've memorized it by now:

for i in range(len(lst) // batch_size + 1): batch = lst[i * batch_size : (i + 1) * batch_size]

Re: Python 3.12

#246
post #48

Earlier quoted context omitted.

I don't think this is a political advocacy. It's just a personal expression about a social issue. I found the way it was written quite thoughtful, actually, which I respect (though I don't like in its entirety). But I upvoted your comment because I don't think there's a reason for people to downvote your comment. It's absolutely acceptable that someone dislikes the poem and wants to express it here. People confuse th…

If an upvote is for agreement, does downvoting for disagreement not make sense? Or are upvotes meant for something else?

I upvoted to counter what I think it's an unfair downvote.

I wouldn't upvote if people were not unfairly downvoting.

This person has the right to express here and to have their expression viewed by others.

If too many people downvote, they're denied this right.

Re: Python 3.12

#247

Earlier quoted context omitted.

If an upvote is for agreement, does downvoting for disagreement not make sense? Or are upvotes meant for something else?

I downvoted it because it just leads to 2/3s of the thread being an off topic flame-war. Also like others have said, upvotes are not for agreeing. They are for rewarding higher quality discussion, on topic discussion, etc.

I think it's clear in my comment that I do not agree. I start with that upfront. I upvoted only to counter what I think are unfair downvotes.

Re: Python 3.12

#248

Earlier quoted context omitted.

It’s like pointer chasing, except the docs having you chase around kwargs are incomplete and there’s gaps. You have to read source code. The Azure SDK is full of them, making liberal use of kwargs.pop. What a nightmare.

The Azure SDK generally have a lot of silliness in the Python implementation. Functions that take string as inputs, except of course they don't, they take two or three very specific string values and use them to control functionality. What those values are... Well, you should take a look at the ENUM in the C# implementation to figure that part out.

Relieved to learn its not just the Java libs that are piles of hastily cobbled-together crap.

Re: Python 3.12

#249
post #71

Earlier quoted context omitted.

Both-sides-ism is not some kind of "free points" move in an argument. It's entirely consistent to believe (a) that a "tame" political statement supporting immigrants is acceptable in release notes, while also believing (b) that a cutesy poem defaming immigrants would be abhorrent and unacceptable. No one has an obligation to think that all political messages are acceptable just because they think that some political…

> It's entirely consistent to believe (a) that a "tame" political statement supporting immigrants is acceptable in release notes, while also believing (b) that a cutesy poem defaming immigrants would be abhorrent and unacceptable. The opposing cutesy poem wouldn't be defaming immigrants! It would be acknowledging a nation can't exist without borders, sovereignty matters, and unchecked migration is not universally goo…

Borders are a relatively new concept and nations existed before borders so what you're saying is trivially false.

The US was built on unchecked migration and it did pretty well out of it.

Re: Python 3.12

#250

Earlier quoted context omitted.

> Maybe now I'll be able to actually figure out what data to send libraries without actually reading their source code. One could hope, but any library abusing kwargs in all their methods is showing they’re willing to go through the absolute minimum to make their code usable, let alone readable and self-documenting.

It’s like pointer chasing, except the docs having you chase around kwargs are incomplete and there’s gaps. You have to read source code. The Azure SDK is full of them, making liberal use of kwargs.pop. What a nightmare.

`kwargs.pop`, what a phrase – it's amazing how the right arrangement of syllables can make your brain shudder. (:
Post reply on HN