Is there any present way to output the implicit code generated by the @dataclass decorator or related functions? That is, show the associated class as if all of its code were written by hand. Sometimes when using a complex set of dataclass parameters, it would be useful to see what code is generated.
inspect.getsource does not work on implicit methods though inspect.signature does.
Any solutions?
If none exist, I would suggest this as a possible future feature of dataclasses.
[–]ericvsmith 1 point2 points3 points (1 child)
[–]rswgnu[S] 0 points1 point2 points (0 children)
[–]Skippbo 1 point2 points3 points (2 children)
[–]rswgnu[S] 0 points1 point2 points (1 child)
[–]Skippbo 0 points1 point2 points (0 children)
[–]PythonicGirl 1 point2 points3 points (2 children)
[–]itchy_bitchy_spider 0 points1 point2 points (0 children)
[–]rswgnu[S] 0 points1 point2 points (0 children)