Sujet : Triggered By Mediocre Code (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.pythonDate : 25. Aug 2024, 23:53:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vag94r$23hhf$2@dont-email.me>
User-Agent : Pan/0.160 (Toresk; )
Looking at this article about the top three languages for getting
programming jobs
<
https://www.zdnet.com/article/want-a-programming-job-make-sure-you-learn-these-three-languages/>,
naturally I couldn’t help noticing the code in the screenshot at the
top (my transcription):
bufferedNumber = str(doc.GetTime().GetFrame(docFps))
if len(bufferedNumber)<4:
for x in range(len(bufferedNumber),4):
bufferedNumber = "0" + bufferedNumber
I mean, really? Four lines to do what could be done in a single
expression?
Was that written by a PHP programmer, do you think?