this post was submitted on 11 Aug 2022
0 points (NaN% liked)

General Programming Discussion

185 readers
1 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 5 years ago
MODERATORS
 

I don't know how Python 3.10's string works internally. Is it choosing between 8-bit, 16-bit, and 32-bit per character in runtime?

For example:

for line in open('read1.py'):
    print(line)

Can the line string be an 8-bit, 16-bit, or 32-bit character string in each iteration? Should the line be 8-bit by default and become a 32-bit string if that line has an emoji?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here