Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Neil Girdhar
I've tried PyParsing. I haven't tried Grako. On Mon, Apr 3, 2017 at 8:54 AM Ryan Gonzalez wrote: > Have you tried PyParsing and/or Grako? They're some of my favorites (well, > I like PLY too, but I'm thinking you wouldn't like it too much). > > -- > Ryan (ライアン) > Yoko

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Ryan Gonzalez
Have you tried PyParsing and/or Grako? They're some of my favorites (well, I like PLY too, but I'm thinking you wouldn't like it too much). -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com On Apr 3, 2017 3:26 AM, "Neil Girdhar"

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Neil Girdhar
On Mon, Apr 3, 2017 at 2:31 AM Mark Lawrence via Python-ideas < python-ideas@python.org> wrote: > On 03/04/2017 02:22, Neil Girdhar wrote: > > Same. One day, Python will have a decent parsing library. > > > > Nothing here https://wiki.python.org/moin/LanguageParsing suits your > needs? > No,

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Mark Lawrence via Python-ideas
On 03/04/2017 02:22, Neil Girdhar wrote: Same. One day, Python will have a decent parsing library. Nothing here https://wiki.python.org/moin/LanguageParsing suits your needs? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-02 Thread Neil Girdhar
Same. One day, Python will have a decent parsing library. On Friday, March 31, 2017 at 4:21:51 AM UTC-4, Stephan Houben wrote: > > Hi all, > > FWIW, I also strongly prefer the Verbal Expression style and consider > "normal" regular expressions to become quickly unreadable and >

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-31 Thread Paul Moore
On 31 March 2017 at 09:20, Stephan Houben wrote: > FWIW, I also strongly prefer the Verbal Expression style and consider > "normal" regular expressions to become quickly unreadable and > unmaintainable. Do you publish your code widely? What's the view of 3rd party users of

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-31 Thread Stephan Houben
Hi all, FWIW, I also strongly prefer the Verbal Expression style and consider "normal" regular expressions to become quickly unreadable and unmaintainable. Verbal Expressions are also much more composable. Stephan 2017-03-31 9:23 GMT+02:00 Stephen J. Turnbull

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-31 Thread Stephen J. Turnbull
Abe Dillon writes: > Note that the entire documentation is 250 words while just the syntax > portion of Python docs for the re module is over 3000 words. Since Verbal Expressions (below, VEs, indicating notation) "compile" to regular expressions (spelling out indicates the internal matching

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-30 Thread Abe Dillon
> a huge advantage of REs is that they are common to many > languages. You can take a regex from grep to Perl to your editor to > Python. They're not absolutely identical, of course, but the basics > are all the same. Creating a new search language means everyone has to > learn anew. > ChrisA 1)

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-29 Thread Nick Coghlan
On 28 March 2017 at 01:17, Simon D. wrote: > It would ease the use of regexps in Python We don't really want to ease the use of regexps in Python - while they're an incredibly useful tool in a programmer's toolkit, they're so cryptic that they're almost inevitably a

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-29 Thread Chris Angelico
On Thu, Mar 30, 2017 at 12:47 PM, Abe Dillon wrote: >> I feel like that borders on a bit too wordy... > > > I think the use of words instead of symbols is one of the things that makes > Python so readable. The ternary operator is done with words: > > value = option1 if

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-29 Thread Abe Dillon
> > I feel like that borders on a bit too wordy... I think the use of words instead of symbols is one of the things that makes Python so readable. The ternary operator is done with words: value = option1 if condition else option2 reads almost like English, while: value = condition ? option1:

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-29 Thread Ryan Gonzalez
I feel like that borders on a bit too wordy... Personally, I'd like to see something like Felix's regular definitions: http://felix-lang.org/share/src/web/tut/regexp_01.fdoc#Regular_definitions._h -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-29 Thread Markus Meskanen
On Mar 29, 2017 23:31, "Abe Dillon" wrote: My 2 cents is that regular expressions are pretty un-pythonic because of their horrible readability. I would much rather see Python adopt something like Verbal Expressions ( https://github.com/VerbalExpressions/

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-29 Thread Abe Dillon
My 2 cents is that regular expressions are pretty un-pythonic because of their horrible readability. I would much rather see Python adopt something like Verbal Expressions ( https://github.com/VerbalExpressions/PythonVerbalExpressions ) into the standard library than add special syntax support for

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-28 Thread Paul Moore
On 28 March 2017 at 08:54, Simon D. wrote: > I believe that the u"" notation in Python 2.7 is defined by while > importing the unicode_litterals module. That's not true. The u"..." syntax is part of the language. from future import unicode_literals is something completely

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-28 Thread Simon D.
* Serhiy Storchaka [2017-03-27 18:39:19 +0300]: > There are several regular expression libraries for Python. One of them is > included in the stdlib, but this is not the first regular expression library > in the stdlib and may be not the last. Particular project can choose

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-27 Thread Markus Meskanen
On Tue, Mar 28, 2017 at 8:37 AM, Chris Angelico wrote: > > Yes, but if the "in" operator is used, it would still work, because > r"..." is a str, and "str" in "string" is meaningful. > > But I think a better solution will be for regex literals to be > syntax-highlighted

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-27 Thread Markus Meskanen
On Mar 28, 2017 06:08, "Steven D'Aprano" wrote: On Mon, Mar 27, 2017 at 05:17:40PM +0200, Simon D. wrote: > The regexp string litteral could be represented by : re"" > > It would ease the use of regexps in Python, allowing to have some regexp > litterals, like in Perl or

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-27 Thread Steven D'Aprano
On Mon, Mar 27, 2017 at 05:17:40PM +0200, Simon D. wrote: > The regexp string litteral could be represented by : re"" > > It would ease the use of regexps in Python, allowing to have some regexp > litterals, like in Perl or JavaScript. > > We may end up with an integration like : > > >>>

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-27 Thread Serhiy Storchaka
On 27.03.17 18:17, Simon D. wrote: After some french discussions about this idea, I subscribed here to suggest adding a new string litteral, for regexp, inspired by other types like : u"", r"", b"", br"", f""… The regexp string litteral could be represented by : re"" It would ease the use of