Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Small bug in makeunicodedata.py #96019

Closed
Closed
Labels
type-bugAn unexpected behavior, bug, or error
@cfbolz

Description

@cfbolz

I was readingmakeunicodedata.py and found a small issue that leads to a bit of wasted space in theunicodedata module. Thiscode:

try:i=decomp_data.index(decomp)exceptValueError:i=len(decomp_data)decomp_data.extend(decomp)decomp_size=decomp_size+len(decomp)*2

will always take the exception path because bothdecomp_data anddecomp are lists of ints, so theindex call always raises. I think it was copy-pasted from some similar code afew lines up which however is about a lists of strings and a string, so it works there.

I will prepare a PR. The space saving isn't gigantic (about 4.5kib) but as it stands the code is confusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp