Live data from Hacker News

Python 3.15: features that didn't make the headlines

blog.changs.co.uk

41–50 of 236 posts

Re: Python 3.15: features that didn't make the headlines

#41

Earlier quoted context omitted.

Same, I’m not sure how Python survives this outside of machine learning. All of our services we were our are significantly faster and more reliable. We used Rust, it wasn’t hard to do

the funny thing is that everyone, including myself, posited that python would be the winner of the ai coding wars, because of how much training data there is for it. My experience has been the opposite.

Typescript wins in terms of training data IMHO, by which I mean that the training data is large enough that AI does great with TS, and the language is (IMHO) superior to Python in many ways.

I personally now use a mixture of Typescript and Rust for most things, including AI coding. Its been working quite well. (AI doesn't handle Rust as well as TS, in that the code isn't quite idiomatic, but it does ok)

Re: Python 3.15: features that didn't make the headlines

#42
post #34
post #29

Earlier quoted context omitted.

As a now deleted comment pointed out, lazy imports had been requested forever. They were rejected forever and were accepted just when BigCorps wanted them . Python-dev now is paid to shore up the failed Instagram stack.

I too am outraged that a product would prioritize its biggest users.

Is the biggest user larger than the combined set of individual users who had asked for (or would benefit from) the same thing? I honestly don't know, but I don't think that things are always as simple as you're implying in a world where we have the collective action problem.

Re: Python 3.15: features that didn't make the headlines

#43
post #38

Earlier quoted context omitted.

I think this is just a natural consequence of an easy-to-use package system. The exact same story as with node. If you don't want lots of imports, don't make it so damn easy to pile them into projects. I'm frankly surprised we still see so few supply chain attacks, even though they picked up their cadence dramatically.

This seems a lot more due to an import running arbitrary code because stuff can happen in the top-level of a module rather than only happening in functions. From what I can tell, it seems pretty common for dynamically typed languages and pretty much entirely absent from statically typed ones, which tend to have a main function that everything else happens inside transitively. I guess this makes it easy if what you're…

> it seems pretty common for dynamically typed languages and pretty much entirely absent from statically typed ones

Counter-example is Go and init() function.

Re: Python 3.15: features that didn't make the headlines

#44
post #4

From this example: lazy from typing import Iterator def stream_events(...) -> Iterator[str]: while True: yield blocking_get_event(...) events = stream_events(...) for event in events: consume(event) Do we finally have "lazy imports" in Python? I think I missed this change. Is this also something from Python 3.15 or earlier?

Note that you can work around it by implementing `def __getattr__(name: str) -> object:` at the module level on earlier Python versions

Somehow I have no trouble imagining this being used as a rationale to avoid unnecessary "magic" to the language for years

Re: Python 3.15: features that didn't make the headlines

#45

> I've left this one to the bonus section because I've never used set operations on Counters and I'm finding it extremely hard to think of a use case for xor specifically. But I do appreciate the devs adding it for completeness. Check out symmetric difference https://en.wikipedia.org/wiki/Symmetric_difference

Yeah, but applied to counters it would be the symmetric difference between multisets, which doesn't have a natural definition. If I understood the proposal they'd be defining it as absolute value of the difference of the counts, which isn't even associative.

If they only considered parities it could be interpreted as addition in F_2, which is more natural, but I'd still agree that it's hard to see how you'd use something like this in practice.

Re: Python 3.15: features that didn't make the headlines

#46
post #32

I was so into Python for 10 years, was enjoyable to work in. But have deleted 100k+ lines this year already moving them to faster languages in a post AI codebot world. Mostly moving to go these days.

Three things I find unlikely about this: - You wrote 100K lines of code (I've worked on several large C++ projects that were far smaller) - You wrote those lines in Python (surely the whole point of Python is to write less code) - You deleted them (never delete anything, isn't this what modern VCS is all about?) But whatever floats your boat.

100k lines is tiny what are you on about, especially in the monolithic app sass world where many Fyll stack apps that handle all business ops are probably written with Django.

Our entire business runs on 300k lines of Ruby (on Rails) and I can keep most of the business logic in my head. I would say our codebase is not exactly “tiny” and just cracking the ceiling into “smal” territory. And comparatively, people probably write even less code in equivalent rails apps to django ones. 100k lines of C++ is miniscule.

Obviously “deleting code” in this context doesn’t mean purging version control history but the current state of the codebase.

Re: Python 3.15: features that didn't make the headlines

#47
post #32

Earlier quoted context omitted.

Three things I find unlikely about this: - You wrote 100K lines of code (I've worked on several large C++ projects that were far smaller) - You wrote those lines in Python (surely the whole point of Python is to write less code) - You deleted them (never delete anything, isn't this what modern VCS is all about?) But whatever floats your boat.

Uhm what? All of those things are totally ordinary.

> All of those things are totally ordinary. reply

I would need some evidence of that.

Re: Python 3.15: features that didn't make the headlines

#48
I am not a python dev but have the utmost respect for the ecosystem.

But damn, with all the supply chain attacks now in the news, could they just make a simple way (for non python insiders) to install python apps without fearing to be infected by a vermin with full access to my $HOME ...

Re: Python 3.15: features that didn't make the headlines

#49
post #32

Earlier quoted context omitted.

Three things I find unlikely about this: - You wrote 100K lines of code (I've worked on several large C++ projects that were far smaller) - You wrote those lines in Python (surely the whole point of Python is to write less code) - You deleted them (never delete anything, isn't this what modern VCS is all about?) But whatever floats your boat.

100k lines is tiny what are you on about, especially in the monolithic app sass world where many Fyll stack apps that handle all business ops are probably written with Django. Our entire business runs on 300k lines of Ruby (on Rails) and I can keep most of the business logic in my head. I would say our codebase is not exactly “tiny” and just cracking the ceiling into “smal” territory. And comparatively, people probab…

> 100k lines is tiny

No, no, it is not, or at least not in my experience (I do not and never have done web development - medium performance C++ code - I don't see how I could write, understand and support 100K lines of code in this area).

And so, what does your Ruby code actually do?

Re: Python 3.15: features that didn't make the headlines

#50
post #32

Earlier quoted context omitted.

Three things I find unlikely about this: - You wrote 100K lines of code (I've worked on several large C++ projects that were far smaller) - You wrote those lines in Python (surely the whole point of Python is to write less code) - You deleted them (never delete anything, isn't this what modern VCS is all about?) But whatever floats your boat.

> You deleted them (never delete anything, isn't this what modern VCS is all about?) The person said: "deleted 100k+ lines this year already moving them to faster languages" Are you saying that when you move code to another language/rewrite in another language, you leave the original languages code in your repo? They didn't say they deleted it from their git history. I delete code all the time (doesn't mean its "gone…

Well, they deleted it from somewhere. As I assumed they were using a VCS I assumed they deleted it from that. Or are they really short of disk space?
Post reply on HN