Skip to content

How does Pylance/Pyright get the documentation string for a NamedTuple's field? #7960

Answered by erictraut
bmitc asked this question in Q&A
Discussion options

You must be logged in to vote

Pyright implements its own parser (written in TypeScript). I don't think the CPython parser retains variable docstrings in the AST it produces. @JelleZijlstra could probably confirm.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@bmitc
Comment options

@JelleZijlstra
Comment options

@bmitc
Comment options

@Viicos
Comment options

@bmitc
Comment options

Answer selected by bmitc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants