TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Best way to find out when features were added to languages?

2 点作者 wassenaar10大约 3 年前
An engineer (non-software) friend of mine asked me if range() was a function that had been added recently to Python, or if his professors just never showed it to him.<p>I told him range() has been there since the 90s and that his professors were just bad at Python. The thing is, I&#x27;m not actually sure about the first part. I know the history of some features, for example, I know that list-comprehensions were only added in Python 2 around 2000 and I know that map, reduce, and filter were added pretty early (like 1993) by programmers who were familiar with lisp. But I&#x27;m finding it really hard to find out when specific, arbitrary features were added to Python (or to other languages).<p>Google is no help because regardless of how I structure my query or tweak the search options, it just shows me endless SEO drivel sites that are only remotely related to what I searched. Anyone have a better way to find out stuff like this?

2 条评论

Someone大约 3 年前
In general, you’d either have to dig up release notes, dig through version control history, or both (history should be sufficient, but may not exist for old languages), or run older binaries.<p>As to <i>range</i>: docs.python.org has documentation for supported versions, including version 2.7.<p>It shows range existed as a function in 2.7 (<a href="https:&#x2F;&#x2F;docs.python.org&#x2F;2.7&#x2F;library&#x2F;functions.html#range" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;2.7&#x2F;library&#x2F;functions.html#range</a>), but no longer is a function in 3.5 (<a href="https:&#x2F;&#x2F;docs.python.org&#x2F;3.5&#x2F;library&#x2F;functions.html#func-range" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;3.5&#x2F;library&#x2F;functions.html#func-rang...</a>)<p>So, in some sense it was removed (in 3.0, I think), and replaced by an “immutable sequence type”.<p>If you want to check binaries, <a href="https:&#x2F;&#x2F;www.python.org&#x2F;download&#x2F;releases&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.python.org&#x2F;download&#x2F;releases&#x2F;</a> and <a href="https:&#x2F;&#x2F;www.python.org&#x2F;downloads&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.python.org&#x2F;downloads&#x2F;</a> have old releases you might try out.
thesuperbigfrog大约 3 年前
It&#x27;s going to depend on which programming language you are examining, if that programming language is standardized, and how much of the development process is publicly available (open development process vs. proprietary languages with closed source development).<p>For Python, it looks like everything is on GitHub:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;cpython" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;cpython</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;peps" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;peps</a><p>It might take some exploring depending on what you are trying to find (over 100k commits in the git repo), but it looks like it is all there going back to Python 2.0 and earlier.