← Back to Bitcoin Improvement Proposals
BIPinformationalscriptevents

BIP388: fix variable name in from_descriptor() to prevent NameError

Replace unintended reference to local variable name `desc` with the correct method parameter `descriptor` in `from_descriptor`. The previous code raised a NameError when scanning operators because desc is not defined in that scope. This change aligns with the rest of the method, which consistently uses descriptor, and allows the example in main to run without error.

No reviews
MozirDmitriy·Updated Sep 4, 2025·0 reviews·0 attestations·View source
Collections:BIPs — Merged

Specification

Replace unintended reference to local variable name desc with the correct method parameter descriptor in from_descriptor. The previous code raised a NameError when scanning operators because desc is not defined in that scope. This change aligns with the rest of the method, which consistently uses descriptor, and allows the example in main to run without error.

Discussion (0 threads)

Loading discussions...