Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > de.comp.lang.python > #6257
| Path | csiph.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Christian Winther <cwsolani2020@nurfuerspam.de> |
| Newsgroups | de.comp.lang.python |
| Subject | [Python-de] Verstaendnis-Frage zu yield und Liste dahinter |
| Date | Wed, 19 Mar 2025 19:45:00 +0100 |
| Organization | privat |
| Message-ID | <vrf3bc$4mvg$1@solani.org> (permalink) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Wed, 19 Mar 2025 18:45:00 -0000 (UTC) |
| Injection-Info | solani.org; logging-data="154608"; mail-complaints-to="abuse@news.solani.org" |
| User-Agent | Mozilla Thunderbird |
| Cancel-Lock | sha1:JnN4Iywan8zJ1kOPhBW+JTj+BRs= |
| X-User-ID | eJwFwYcBwDAIA7CXwrDB52SU/0+ohKDxVhJMDGY66yhWGo6N1GTHKyNHO25tuJkvvzbP4bphkic+va6z1w8hwhQl |
| Xref | csiph.com de.comp.lang.python:6257 |
Show key headers only | View raw
Hallo Miteinander,
ich arbeite mich gerade ein bisschen in Python ein.
Ich habe hier Funktionen vorliegen ähnlich diesen hier:
def parse_was(info):
parsed = {}
info1, info2 = info
for idx, info1 in enumerate(info1):
name, status, cpu = info1
...
parsed[name] = {
"status": map.get(status, status_unknown).value,
"cpu_percent": float(cpu),
...
}
return parsed
def mach_was(parsed):
for name, value in parsed.items():
if value["cpu_percent"] is not None:
yield name, {}
----------------
Frage:
Was gibt
yield name, {}
zurück?
Speziell: Was macht/beinhaltet der Ausdruck: {}
MfG Christian
Back to de.comp.lang.python | Previous | Next — Next in thread | Find similar
[Python-de] Verstaendnis-Frage zu yield und Liste dahinter Christian Winther <cwsolani2020@nurfuerspam.de> - 2025-03-19 19:45 +0100
Re: [Python-de] Verstaendnis-Frage zu yield und Liste dahinter Tim Landscheidt <tim@tim-landscheidt.de> - 2025-03-19 20:51 +0000
Re: [Python-de] Verstaendnis-Frage zu yield und Liste dahinter Christian Winther <cwsolani2020@nurfuerspam.de> - 2025-03-20 18:33 +0100
Re: [Python-de] Verstaendnis-Frage zu yield und Liste dahinter "Peter J. Holzer" <hjp-usenet4@hjp.at> - 2025-03-20 19:15 +0100
Re: [Python-de] Verstaendnis-Frage zu yield und Liste dahinter Christian Winther <cwsolani2020@nurfuerspam.de> - 2025-03-20 19:34 +0100
Re: [Python-de] Verstaendnis-Frage zu yield und Liste dahinter Hermann Riemann <nospam.ng@hermann-riemann.de> - 2025-03-20 19:38 +0100
[Python-de] Re: Verstaendnis-Frage zu yield und Liste dahinter Hartmut Goebel <h.goebel@goebel-consult.de> - 2025-03-21 16:23 +0100
csiph-web