3

Design/code review There is nothing to review in the first section… because there’s just no code there. The only comment to make is: virtual void common_action() override { /* ... */ } Use virtual OR override… not both. (Actually, the rule is “use only one of virtual, override, or final… but you should almost never use final.) So the only thing to really ...


2

I know this is a part of an exercise, but it feels like a lot of wheel reinventing where you can leverage builtin Python capabilities for date validation: from datetime import date >>> date(2020, 2, 29) # leap year date works datetime.date(2020, 2, 29) >>> date(2002, 2, 29) # non-leap year will raise ValueError ValueError: day is out of ...


2

I suggest some minor improvements in the regular expression: make sure that the same separator is used between day and month and between month and year with a backreference (?P=sep), replace numbered capture groups with named, and make non-needed groups, if there wer any, non-capturing with ?:. Consequently, finditer and groupdict are used, and the day is ...


2

Paths sys.path.append('..') is scary. If it needs to happen at all, it should not be done at the global level - that will interfere with other consumers of your program's symbols. If it can be avoided, don't do this at all. Type hints In a function signature as long and complex as this: def __init__( self, input_shape, classes_file, ...


Only top voted, non community-wiki answers of a minimum length are eligible