The builtins are created inside the initializer. At this point wants_doc? is always false becase the doc generator only set it to true after the initializer.
I don't think there's any noticable impact from having a dozend doc strings assigned in every program AST, even without wants_doc. Skipping docs is an optimization that pays out when parsing huge program ASTs. But for these few doc strings, there shouldn't be any issue.
The doc strings are literals, so they don't even occupy any memory (not that it would hurt much if it did).
The builtins are created inside the initializer. At this point
wants_doc?
is alwaysfalse
becase the doc generator only set it totrue
after the initializer.I don't think there's any noticable impact from having a dozend doc strings assigned in every program AST, even without
wants_doc
. Skipping docs is an optimization that pays out when parsing huge program ASTs. But for these few doc strings, there shouldn't be any issue. The doc strings are literals, so they don't even occupy any memory (not that it would hurt much if it did).Follow-up to #14276