Sujet : Re: name of the package (or style) (Posting On Python-List Prohibited)
De : HenHanna (at) *nospam* devnull.tb (HenHanna)
Groupes : comp.lang.python comp.lang.lispDate : 21. Aug 2024, 21:25:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va5ifi$5h9$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 8/21/2024 12:20 AM, Lawrence D'Oliveiro wrote:
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
___________________________
> odf.text.Span
> (
> text ="$%s" % format_common.my_format_amount(job_charge)
> ),
> )
i think this look better like this:
> odf.text.Span
> ( text ="$%s" % format_common.my_format_amount(job_charge) ), )
OR just one line.
_______________________
Giving [Close Parenthesis] (or END or curly-bracket) its own line
----------- if this is discussed anywhere, pls let me know!