top | item 40530182

(no title)

alibero | 1 year ago

Later down the line, if you want to have separate behaviour for task deadlines vs payment deadlines, you're going to have to go through your codebase and look at every call to set_deadline and figure out if it's being used to set a task deadline or payment deadline. If you have an inkling that the deadlines might need a different behaviour, the “good example” can save you an annoying refactor in the future.

discuss

order

hcarvalhoalves|1 year ago

Don’t make the symbol public, or call it _set_deadline, or whatever is the idiom in Python. The point of this example is ofc not having set_deadline be used, but the other symbols.

Again, you don’t need to duplicate a function body just to have semantic names.