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] Add pathlib.Path.write_json andpathlib.Path.read_json

2017-03-29 Thread Barry Scott
> On 27 Mar 2017, at 15:08, Markus Meskanen wrote: > > -1, should we also include write_ini, write_yaml, etc? > Markus, You illustrate why this is a bad design pattern to implement. It does not scale. I attended a talk at PYCON UK that talked to the point of using object composition rather

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/ PythonVerbalExpressions ) into the standar

Re: [Python-ideas] Add pathlib.Path.write_json andpathlib.Path.read_json

2017-03-29 Thread Nick Timkovich
> > I attended a talk at PYCON UK that talked to the point of using object > composition > rather then rich interfaces. I cannot recall the term that was used to > cover this idea. > > Separating things by concern/abstraction (the storage vs. the serialization) results in easier-to-learn code, *e

Re: [Python-ideas] Add pathlib.Path.write_json and pathlib.Path.read_json

2017-03-29 Thread Wes Turner
On Mon, Mar 27, 2017 at 4:27 PM, Wes Turner wrote: > > > On Mon, Mar 27, 2017 at 10:34 AM, Chris Barker > wrote: > >> On Mon, Mar 27, 2017 at 7:59 AM, Paul Moore wrote: >> >>> On 27 March 2017 at 15:40, Ram Rachum wrote: >>> > Another idea: Maybe make json.load and json.dump support Path objec

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 http://

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: o

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 condition else option2 > > r

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

2017-03-29 Thread Stephen J. Turnbull
Abe Dillon writes: > 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 t

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 maintainability nightmare. Ba

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

2017-03-29 Thread Simon D.
* Simon D. [2017-03-28 09:56:05 +0200]: > The str integrated one also, but maybe confusing, which regexp lib is > used ? (must be the default one). > Ok, this was a mistake, based on JavaScript memories… There is no regexp aware functions around str, but some hint to go find your happiness in th