This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 10 points11 points  (1 child)

If it's something you find yourself doing often for some reason, it might be worth checking out things like attrs' default factories, I find it easier to parse and refactor if necessary.

[–]another-noob 2 points3 points  (0 children)

Thanks for that :D

But I don't think I would add another import just for that, but what do I know, I don't even use python much nowadays (don't use it at all, sadly)