This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sobolevn
Recipients TheRobotCarlson, sobolevn
Date 2021-12-14.21:05:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639515960.03.0.0610393299101.issue46073@roundup.psfhosted.org>
In-reply-to
Content
Moreover, there's always an option to pass `lineno` and `column` explicitly:

```
from ast import *

# if we build the module manually and try it directly
value = Module(
    body=[
        FunctionDef(
            name="items_needed",
            args=arguments(
                posonlyargs=[],
                args=[],
                kwonlyargs=[],
                kw_defaults=[],
                defaults=[],
            ),
            body=[Return(value=Constant(value="test"))],
            decorator_list=[],
            lineno=1,
            column=1,
        )
    ],
    type_ignores=[],
)

unparse(value)  # ok
```
History
Date User Action Args
2021-12-14 21:06:00sobolevnsetrecipients: + sobolevn, TheRobotCarlson
2021-12-14 21:06:00sobolevnsetmessageid: <1639515960.03.0.0610393299101.issue46073@roundup.psfhosted.org>
2021-12-14 21:06:00sobolevnlinkissue46073 messages
2021-12-14 21:05:59sobolevncreate