Talk:Convert seconds to compound duration

From Rosetta Code

Task is ready for accepting solutions!

I've created it as a draft task for now as a formality, but I consider the task description finished - unless of course there is feedback demanding changes. So code away, and say if anything is unclear! --Smls (talk) 21:56, 6 June 2015 (UTC)‎

Hi, the usual process is to wait for at least four different language implementations from four people and no unanswered questions on the talk page before promotion from draft to full task status. This helps the task to mature without too many people doing implementations if problems are found.
I enjoyed doing the Python example and found the task description gave me the info I needed. Thanks. --Paddy3118 (talk) 03:41, 7 June 2015 (UTC)

About the python examples

The first python example doesn't run, because of undefined t. The second one runs, but if fed 0 seconds as input, it gives a blank in return, which is probably not ideal. Other examples may be doing the same thing, but I haven't checked.

Another issue: is it really necessary to post code in the interactive prompt format? It makes testing the code unpleasant because of the ">>>" prompt, and the mixed tab/space indentations looks like crap in my text editor. It may be useful to show users how to use the interactive shell, but since majority of coding is not going to be done in this fashion, having half of the python examples on RC so presented is overdoing it. --Ledrug (talk) 04:40, 7 June 2015 (UTC)

The current specification clearly states that the result for 0 seconds should be blank (or the empty string). I'm fine with that - makes for a clean implementation. Specifically:
  • However, only include quantities with non-zero values in the output (e.g. ...).
  • Meanwhile, as a curiosity question - would the python language spec lose anything if it were changed so that prompts (at least the default prompt) were neutral? Copy and paste of lines containing previously run statements is indeed a handy tool... --Rdm (talk) 11:42, 7 June 2015 (UTC)