Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-39971: Change examples to be runnable#32172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
iritkatriel merged 3 commits intopython:mainfromslateny:s/functional
Jun 25, 2022
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
Change examples to be runnable
  • Loading branch information
@slateny
slateny committedMar 29, 2022
commiteca7410ab44fb932f7dcc8933c8c611d74044cb6
5 changes: 3 additions & 2 deletionsDoc/howto/functional.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -335,7 +335,7 @@ List comprehensions and generator expressions (short form: "listcomps" and
functional programming language Haskell (https://www.haskell.org/). You can strip
all the whitespace from a stream of strings with the following code::

line_list = [' line 1\n', 'line 2 \n',...]
line_list = [' line 1\n', 'line 2 \n',' \n', '']

# Generator expression -- returns iterator
stripped_iter = (line.strip() for line in line_list)
Expand DownExpand Up@@ -363,7 +363,8 @@ have the form::
if condition1
for expr2 in sequence2
if condition2
for expr3 in sequence3 ...
for expr3 in sequence3
...
if condition3
for exprN in sequenceN
if conditionN )
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp