Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #31: cellular telephone interference


comp / comp.lang.lisp / Re: name of the package (or style) (Posting On Python-List Prohibited)

SubjectAuthor
* name of the package (or style) that uses lots of extra lines in Python programmiHenHanna
+- Re: name of the package (or style) that uses lots of extra lines in Python progrrbowman
`* Re: name of the package (or style) (Posting On Python-List Prohibited)HenHanna
 `- Re: name of the package (or style) (Posting On Python-List Prohibited)Lawrence D'Oliveiro

1
Subject: name of the package (or style) that uses lots of extra lines in Python programming?
From: HenHanna
Newsgroups: comp.lang.lisp, comp.lang.python
Organization: A noiseless patient Spider
Date: Wed, 21 Aug 2024 04:55 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.lisp,comp.lang.python
Subject: name of the package (or style) that uses lots of extra lines in
Python programming?
Date: Tue, 20 Aug 2024 21:55:20 -0700
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <va3rvp$3o8rf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 21 Aug 2024 06:55:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="757abca47a047dafa4ec5dd99cda8bf8";
logging-data="3941231"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7Rn0weo9IC0MtS8mh7vU2ZTdBnCeaHNQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:NdPIUy9bD3uXfXKRzzbMkV6V5/g=
Content-Language: en-US
View all headers

What's the name of the package (or style) that uses
lots of extra lines in Python programming?

it looks like this:

main()
{ int c;
.......
}

like Begin-End of Algol, Pascal from 1960's and 1970's.

it'd look like this in Lisp:

(define (fact x)
(begin
(if (zero? x)
1
(* x
(fact
(- x
1)
)
)
)
)
)

Subject: Re: name of the package (or style) that uses lots of extra lines in Python programming?
From: rbowman
Newsgroups: comp.lang.lisp, comp.lang.python
Date: Wed, 21 Aug 2024 07:56 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.lang.lisp,comp.lang.python
Subject: Re: name of the package (or style) that uses lots of extra lines in
Python programming?
Date: 21 Aug 2024 07:56:00 GMT
Lines: 22
Message-ID: <lilksgF3vkeU2@mid.individual.net>
References: <va3rvp$3o8rf$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net +BTgRCvKZWReWMi0Nj8w5wN3MVy4+iogWZNpt8E/AcbJkUoKZR
Cancel-Lock: sha1:MX2LQdl4XypSLQLqHybJF+/PFYw= sha256:Pegh54oxFsKTBhooAT/vPEoPDHmfx/aHniQXYrRCy2Y=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
View all headers

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?
>
> it looks like this:
>
> main()
> {
> int c; .......
> }
>
> like Begin-End of Algol, Pascal from 1960's and 1970's.

If it looks like that it's C not Python.

https://peps.python.org/pep-0008/#blank-lines

'black' is a formatter that will neaten up a file. 'ruff' does quite a bit
more but also can format. If you're stingy with whitespace either will add
extra lines.

Subject: Re: name of the package (or style) (Posting On Python-List Prohibited)
From: HenHanna
Newsgroups: comp.lang.python, comp.lang.lisp
Organization: A noiseless patient Spider
Date: Wed, 21 Aug 2024 20:25 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.python,comp.lang.lisp
Subject: Re: name of the package (or style) (Posting On Python-List
Prohibited)
Date: Wed, 21 Aug 2024 13:25:20 -0700
Organization: A noiseless patient Spider
Lines: 81
Message-ID: <va5ifi$5h9$1@dont-email.me>
References: <va3rvp$3o8rf$1@dont-email.me> <va44g6$3pfsu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Aug 2024 22:25:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1afe418dd980cf7c48cdb7c87c9aef77";
logging-data="5673"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Be/T/ueZJ2gucJK7kY4QdAMkV64CaCQ8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/2WlAYTITsyYy9+cBzsO4+xxiIs=
Content-Language: en-US
In-Reply-To: <va44g6$3pfsu$1@dont-email.me>
View all headers

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!

Subject: Re: name of the package (or style) (Posting On Python-List Prohibited)
From: Lawrence D'Oliv
Newsgroups: comp.lang.python, comp.lang.lisp
Organization: A noiseless patient Spider
Date: Thu, 22 Aug 2024 00:01 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.python,comp.lang.lisp
Subject: Re: name of the package (or style) (Posting On Python-List
Prohibited)
Date: Thu, 22 Aug 2024 00:01:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <va5v4s$21r6$2@dont-email.me>
References: <va3rvp$3o8rf$1@dont-email.me> <va44g6$3pfsu$1@dont-email.me>
<va5ifi$5h9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Aug 2024 02:01:32 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="121cecafcfd9e311c6d841fd8b3330b2";
logging-data="67430"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Pz7h5x4YRS2x2emyhGDyK"
User-Agent: Pan/0.159 (Vovchansk; )
Cancel-Lock: sha1:ikgNgKrXlpKilj/cZWoqrK1qYvs=
View all headers

On Wed, 21 Aug 2024 13:25:20 -0700, HenHanna wrote:

> On 8/21/2024 12:20 AM, Lawrence D'Oliveiro wrote:
>
>> 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.

Except that call was inside a construct that was already indented four
steps deep. So it was wrapped to reduce the line length.

1

rocksolid light 0.9.8
clearnet tor