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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Why Python developers named 'bytearray' in Python 3.x?

1 点作者 _navaneethan将近 11 年前
Python 3.x the ascii string type is named as type(bytearray(b&#x27;bytearrays&#x27;) &quot;bytearray&quot;.It seems quite long characters.<p>Did they consider other options like &quot;byte&quot; or &quot;string&quot; something like that? What was the particular reason for the namespaces?

1 comment

lmm将近 11 年前
&quot;string&quot; would be confusing. &quot;byte&quot; would be misleading. &quot;bytearray&quot; is what it is - it&#x27;s an array of bytes. I don&#x27;t know about the developers, but it seems like an obviously better choice to me.