heathdbrown / research

Things to look at it or that interest me.
0 stars 0 forks source link

Python DataClasses #6

Closed heathdbrown closed 1 year ago

heathdbrown commented 3 years ago

https://docs.python.org/3/library/dataclasses.html

Dataclasses allow you to get rid of init and several other boiler plate methods fitting into to some normal way.

from dataclasses import dataclass

@dataclass
class Animal:
    name: str
    weight: float
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] commented 1 year ago

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.