05.07.18 03:03, Victor Stinner пише:
+ labels = [slabel for label + in self._file.readline()[1:].split(b',') + if (slabel := label.strip())]
labels = [slabel for label in self._file.readline()[1:].split(b',') for slabel in [label.strip()] if slabel]
+ lines = [match.group(1, 2) + for raw_line in raw_lines + if (match := line_pat.search(raw_line.strip()))]
lines = [match.group(1, 2) for raw_line in raw_lines for match in [line_pat.search(raw_line.strip())] if match] But in all these cases I prefer the original loop. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com