1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] Why is Python dataclass.asdict implemented as a class methode rather than an instance...

Discussão em 'Python' iniciado por Stack, Outubro 2, 2024 às 20:03.

  1. Stack

    Stack Membro Participativo

    I would expect to do

    dataclass_obj.asdict()


    rather than

    asdict(dataclass_obj)


    But the latter is how it is implemented. Why?

    Continue reading...

Compartilhe esta Página