Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #312: incompatible bit-registration operators


comp / comp.lang.python / - for (i, j) in zip(x, x[1:])) - for i, j in zip(x, x[1:])) Do these 2 lines compile to the same Bytecode?

SubjectAuthor
* - for (i, j) in zip(x, x[1:])) - for i, j in zip(x, x[1:])) Do these 2 lines comHenHanna
`- Re:Do these 2 lines compile to the same Bytecode? (Posting On Python-List ProhibLawrence D'Oliveiro

1
Subject: - for (i, j) in zip(x, x[1:])) - for i, j in zip(x, x[1:])) Do these 2 lines compile to the same Bytecode?
From: HenHanna
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Sun, 16 Jun 2024 18:10 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.python
Subject: - for (i, j) in zip(x, x[1:])) - for i, j in zip(x, x[1:])) Do these
2 lines compile to the same Bytecode?
Date: Sun, 16 Jun 2024 11:10:43 -0700
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <v4n9r4$5q7f$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 16 Jun 2024 20:10:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="15d315eb6699321768c126a81b6bef90";
logging-data="190703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UVNxH2Zgv3c8j+OQ8VlAui5kyR0yzI2o="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6buaJ9vFCU21xeOAHKE/yXj/mxA=
Content-Language: en-US
View all headers

def diff1(x):
return all(abs(i-j) == 1 for (i, j) in zip(x, x[1:]))

- for (i, j) in zip(x, x[1:]))
- for i, j in zip(x, x[1:]))

Do the above 2 lines compile to the same Bytecode?

Subject: Re:Do these 2 lines compile to the same Bytecode? (Posting On Python-List Prohibited)
From: Lawrence D'Oliv
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Sun, 16 Jun 2024 23:58 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.python
Subject: Re:Do these 2 lines compile to the same Bytecode? (Posting On
Python-List Prohibited)
Date: Sun, 16 Jun 2024 23:58:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <v4nu6n$9hu9$3@dont-email.me>
References: <v4n9r4$5q7f$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 17 Jun 2024 01:58:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ff2e1389104c18fa1ab521b7e2f13122";
logging-data="313289"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fag3OBznjgUbn79PCV6WV"
User-Agent: Pan/0.158 (Avdiivka; )
Cancel-Lock: sha1:0J05w9vorS60+ztlM3e7ES7Lvqg=
View all headers

On Sun, 16 Jun 2024 11:10:43 -0700, HenHanna wrote:

> def diff1(x):
> return all(abs(i-j) == 1 for (i, j) in zip(x, x[1:]))
>
>
> - for (i, j) in zip(x, x[1:]))
> - for i, j in zip(x, x[1:]))
>
> Do the above 2 lines compile to the same Bytecode?

Try it for yourself and see. Tips on how to proceed:
<https://gitlab.com/ldo/python_topics_notebooks/-/blob/master/Python%20Language%20Services.ipynb?ref_type=heads>

1

rocksolid light 0.9.8
clearnet tor