sonntagsgesicht/prettyclass ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python library called prettyclass that makes it easy to define classes with nicer defaults. I want a decorator I can put on a class so it automatically saves the arguments from __init__ onto the instance as attributes, including regular args, *args, keyword only args, defaults, and **kwargs. It should also give the object a clean, readable repr and str, and copying the object should work naturally too. If an argument is set to its default value, leave it out of the short displayed form when that makes sense, like in the examples from the README. Please keep the API simple, so I can do from prettyclass import prettyclass and use it right away. Make sure the package is tidy, tested, and documented enough that someone can understand the basic usage from the README. If you need to check anything about current Python behavior or best practices, look it up online and follow that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab