Guido's Gorgeous Lasagna task 5 docstring is confusing

In task 5 of Guido’s Gorgeous Lasagna, the example docstring for the function is misleading/confusing. See the following (emphasis mine):

Calculate the elapsed cooking time.

:param number_of_layers: int - the number of layers in the lasagna.
:param elapsed_bake_time: int - elapsed cooking time.
:return: int - total time elapsed (in minutes) preparing and cooking.

This function takes two integers representing the number of lasagna layers and the time already spent baking and calculates the total elapsed minutes spent cooking the lasagna.

Both the elapsed_bake_time parameter and the return value of elapsed_time_in_minutes() are said to be “elapsed cooking time,” even though the two values are supposed to be different.

I think that one (or both) of the following changes could fix this:

  • Changing the descriptions of the return value to be “total time elapsed.”
  • Changing the descriptions of elapsed_bake_time to be “elapsed baking time.”

Hi @Yrahcaz7,

Thanks for reporting this. I’ve pushed a clarification in PR 4132.

Let me know if that helps.

2 Likes

That definitely helps! The description is much less confusing now.

(It bothers me a little that the text extends past the wrapping point now, but that’s a relatively minor issue.)

The wrapping depends on your browser window size, your monitor size and font and the drag-able divider bar.

That is normally true, but this is about a docstring in a code block. Before it wrapped at around the same column:

This function takes two integers representing the number of lasagna layers and the
time already spent baking and calculates the total elapsed minutes spent cooking the
lasagna.

While now the second line is significantly longer than the first one:

This function takes two integers representing the number of lasagna layers and the
time already spent baking the lasagna. It calculates the total elapsed minutes spent cooking (preparing + baking).