Depends on the job, and how good your read is of the situation. My experience has been that managers guilt trip or do other emotional games when they’re out of other options. In that case, it may be a safe bet to stand up to them.
Other places you’re more replaceable, or the manager doesn’t care and has an axe to grind. Then it’s trickier.
If the method does a long thing, the keep it long. I do a lot of data analysis and simulation, and so often people who came before had this urge to shorten methods, so we get:
def do_calculation(N, X, y, z, a, b, c): # Setup stuff for i in range(N): calclation(X[i], y, z, a, b, c)`
Sometimes there’s a place for that, like if
calculation
could be swapped for a different function, or ifcalculation
is used all over the program. It’s a pretty good clue that something is up though when the signatures are almost identical. Of course, that has just led to people writing:def do_calculation(big_struct): read_data(big_struct) calculate(big_struct) write_data(big_struct)