cutlet
cutlet copied to clipboard
Put use_foreign_spelling and ensure_ascii in constructor.
Is there a reason why use_foreign_spelling=True, ensure_ascii=True
are not in the Cutlet constructor __init__
? Placing these in the constructor would help IDE software provide the user information about these modifiable attributes and their defaults, and it is more intuitive (for me at least) to write katsu = cutlet.Cutlet(use_foreign_spelling=False)
.
Thanks for the suggestion, that's a good idea.
There's no specific reason it's not in the constructor, but the internal attributes were added as-needed while development was active. Since they seem reasonably stable now it should be fine to move some of them into the constructor.
It took forever, but I just released 0.2.0 with this feature.
Hey, thanks for adding it to the constructor, but it looks like you forgot to use the constructor variables to set the class variables, see line 123. In the class, you have
self.use_foreign_spelling = True
self.ensure_ascii = True
instead of
self.use_foreign_spelling = use_foreign_spelling
self.ensure_ascii = ensure_ascii
Well that's embarrassing, thanks for pointing it out. I just released 0.2.1, which should fix that.