Re: Like the world needed another dice roller

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Vikriti D'Vita via PLUG-discuss
Date:  
To: plug-discuss
CC: Vikriti D'Vita
Subject: Re: Like the world needed another dice roller
Yeah a usage readme would be helpful. Quick glance through the code:
Why are `add_currying` and `multiply_currying` their on functions?
The only place their used is in `test_hdr`.
Too much abstraction makes it harder to understand. I'd have just used
the lambda right there so its obvious what you're testing for without
having to jump between files.

Also, this is specific to python but, in general, it is discouraged to
have getters and setters in python like `def get_die_name(self) -> str:`.
A classes attributes are considered public by default and should be
directly used. If you need a private attribute, you prepend it with two
underscores. like `__some_var`. While this is mostly convention, python
renamed them to `_CLASSNAME__some_var` when accessing from outside the
class and subclasses.
If later you decide that you want to do some work in the getter, you can
make a method with the same name as the attribite, make the attribute
private, and add the `@property` decorator to the getter. No change in
your class's interface.

Otherwise looks great :)

On 6/20/23 10:14, trent shipley via PLUG-discuss wrote:
> I just did a thing.
>
> And I could really use some feedback.  If it is lite the feedback I'd
> get from my last coding job it will go something like: your code works,
> but I don't understand it, there isn't enough documentation, and what
> documentation there is, doesn't help.
>
> https://github.com/trent-shipley/hackable_dice_roller
> <https://github.com/trent-shipley/hackable_dice_roller>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list:
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss


--
Vikriti D'Vita

---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss