Skip to content

getsource not get correct source code #703

@Seraphli

Description

@Seraphli
import dill


class A:
    def a(self):
        print("a")


print(dill.source.getsource(A))


class A:
    def b(self):
        print("b")


print(dill.source.getsource(A))

Which will return

class A:
    def b(self):
        print("b")

class A:
    def b(self):
        print("b")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions