Sujet : Re: name of the package (or style) (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.pythonDate : 21. Aug 2024, 08:20:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va44g6$3pfsu$1@dont-email.me>
References : 1
User-Agent : Pan/0.159 (Vovchansk; )
On Tue, 20 Aug 2024 21:55:20 -0700, HenHanna wrote:
What's the name of the package (or style) that uses
lots of extra lines in Python programming?
Lawrence’s style:
def write_invoice_entry_total(self, total_elapsed, hourly_rate, job_charge) :
if self.first_hours_entry != None :
self.item_para.addElement \
(
odf.text.Span
(
text =
"Total %s hour%s on %s @$%s"
%
(
format_common.my_format_elapsed(total_elapsed),
("", "s")[self.first_hours_entry["time_worked"] > 3600],
format_common.my_format_date
(
self.first_hours_entry["when_worked"]
),
format_common.my_format_amount(hourly_rate),
)
)
)
else :
add_elements \
(
self.item_para,
odf.text.LineBreak(),
odf.text.Span
(
text =
"Total %s hour%s @$%s"
%
(
format_common.my_format_elapsed(total_elapsed),
("", "s")[total_elapsed > 3600],
format_common.my_format_amount(hourly_rate),
)
),
)
#end if
add_elements \
(
self.item_para,
odf.text.Tab(),
odf.text.Span
(
text ="$%s" % format_common.my_format_amount(job_charge)
),
)
self.doc.text.addElement(self.item_para)
self.item_para = None
#end write_invoice_entry_total