TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

1 pointsby _navaneethanalmost 11 years ago
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

lmmalmost 11 years ago
&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.