Repository navigation
Updating a code example in the docs - classes.rst - #27341
sameh-farouk wants to merge 2 commits into
Conversation
the giving example for the generator expressions that yield all words from a page will actually yield all the characters from that page instead, giving that the `page` holds a multiline string. the example could be correct only if the `page` variable contains a list for lines instead, but then the variable name would need to reconsider, ex: `lines`. also the same generator expressions could be simplified to just `unique_words = set(word for word in page.split())`
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Co-authored-by: Dominic Davis-Foster <dominic@davis-foster.co.uk>
|
This PR is stale because it has been open for 30 days with no activity. |
|
Closing this stale PR because the CLA is still not signed. |
the giving example for the generator expressions that yield all words from a page will actually yield all the characters from that page instead, giving that the
pageholds a multiline string as the name implies.the example could be correct only if the
pagevariable contains a list for lines instead, but then the variable name would need to reconsider, for example,lines.the correct code would be something like:
the same generator expressions also could be simplified to just