New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate entry in 'Objects/unicodetype_db.h' #91399
Comments
This one is so tiny that I'm not really sure we want to merge it… === Problem ===
/* a list of unique character type descriptors */
const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 32},
{0, 0, 0, 0, 0, 48},
… The 1st record ( === Detailed description ===
def makeunicodetype(unicode, trace):
dummy = (0, 0, 0, 0, 0, 0)
table = [dummy] # (1)
cache = {0: dummy} # (2)
for char in unicode.chars:
# Things…
item = (upper, lower, title, decimal, digit, flags)
i = cache.get(item) # (3)
if i is None:
cache[item] = i = len(table)
table.append(item)
index[char] = i
=== Result === The first time we get to a character that has === Fix === In the line I will submit PR on github in just a sec… |
CLA is signed, but there is this 'it might take a few days before your tracker profile is updated'. Added version 3.11 (present also in previous versions, bot no point in back-porting it). Github: #32376 |
Thanks, looks like this has been completed |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: