[issue41259] Find adverbs is not correct on the documentation

2022-02-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2022-02-04 Thread Jacob Walls


Jacob Walls  added the comment:

Fixed in PR 21420, suggest closing as fixed.

--
nosy: +jacobtylerwalls

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2020-08-04 Thread Sagnik Mazumder


Sagnik Mazumder  added the comment:

fixed finding adverbs example in re docs

--
message_count: 5.0 -> 6.0
nosy: +Sagnik Mazumder
nosy_count: 6.0 -> 7.0
pull_requests: +20871
pull_request: https://github.com/python/cpython/pull/21728

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2020-07-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I think it's fine as-is.  The real purpose of the example is show basic 
patterns in writing regexes.  Pig-latin examples or searching for words ending 
in -ly make for nice beginner examples.   I like the OP's modification because 
it teaches a general skill (the importance of \b for making sure you get whole 
words).

We could add a link to the Natural Language Toolkit for people who are getting 
serious about searching for parts of speech.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2020-07-09 Thread Peter Otten


Peter Otten <__pete...@web.de> added the comment:

While I don't want to start a philosical discussion -- is that really better? 
Finding adverbs with a regex doesn't work in the general case -- think 
butterfly, panoply, well -- and the example is meant to illustrate the usage of 
re.findall() rather than regex syntax.

"finding adverbs" is just shorter and easier to understand than "finding 
sequences of word characters that end with "ly".

--
nosy: +peter.otten

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2020-07-09 Thread Rim Chatti


Rim Chatti  added the comment:

re.findall(r"\w+ly", text) does not find all adverbs in a sentence, it finds 
words that contain ly (not ending with ly) :
if text= 'andlying clearly', output: [andly, clearly]
which is wrong! 
the right way to do this is re.findall(r'\b\w+ly\b',text)
output= clearly!

--
components: +Regular Expressions -Documentation
keywords: +patch
message_count: 2.0 -> 3.0
nosy: +ezio.melotti, mrabarnett
nosy_count: 3.0 -> 5.0
pull_requests: +20569
stage:  -> patch review
type:  -> behavior
pull_request: https://github.com/python/cpython/pull/21420

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2020-07-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Please submit a PR.

The parenthesis are not needed:
   re.findall(r"\b\w+ly\b", text)

--
keywords: +easy
nosy: +rhettinger
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2020-07-09 Thread Rim Chatti


Change by Rim Chatti :


--
title: Find adverbs is not correct -> Find adverbs is not correct on the 
documentation

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com