Re: [Python-ideas] PEP: Distributing a Subset of the Standard Library

2016-12-06 Thread Tomas Orsava
On 12/06/2016 03:27 AM, Nick Coghlan wrote: On 5 December 2016 at 22:53, Tomas Orsava wrote: On 12/05/2016 01:42 PM, Nick Coghlan wrote: Essentially, that would be the "name.missing.py" part of the draft proposal for optional standard library modules, just with a regular "name.py" module name

Re: [Python-ideas] Proposal: Tuple of str with w'list of words'

2016-12-06 Thread Random832
On Sat, Nov 12, 2016, at 13:05, Steven D'Aprano wrote: > I'm rather luke-warm on this proposal, although I might be convinced to > support it if: > > - w'...' unconditionally split on any whitespace (possibly > excluding NBSP); > > - and normal escapes worked. Is there any particular objecti

Re: [Python-ideas] Proposal: Tuple of str with w'list of words'

2016-12-06 Thread Stephen J. Turnbull
Random832 writes: > Is there any particular objection to allowing the backslash-space escape > (and for escapes that mean whitespace characters, such as \t, \x20, to > not split, if you meant to imply that they do)? That would provide the > extra push to this being beneficial over split(). Yo

Re: [Python-ideas] Proposal: Tuple of str with w'list of words'

2016-12-06 Thread Steven D'Aprano
On Tue, Dec 06, 2016 at 04:01:24PM -0500, Random832 wrote: > On Sat, Nov 12, 2016, at 13:05, Steven D'Aprano wrote: > > I'm rather luke-warm on this proposal, although I might be convinced to > > support it if: > > > > - w'...' unconditionally split on any whitespace (possibly > > excluding NB

Re: [Python-ideas] PEP: Distributing a Subset of the Standard Library

2016-12-06 Thread Nick Coghlan
On 7 December 2016 at 02:50, Tomas Orsava wrote: > So using _sysconfigdata as inspiration, it would likely be possible to > provide a "sysconfig.get_missing_modules()" API that the default > sys.excepthook() could use to report that a particular import didn't > work because an optional standard li

Re: [Python-ideas] Proposal: Tuple of str with w'list of words'

2016-12-06 Thread Random832
On Tue, Dec 6, 2016, at 19:51, Stephen J. Turnbull wrote: > Random832 writes: > > > Is there any particular objection to allowing the backslash-space escape > > (and for escapes that mean whitespace characters, such as \t, \x20, to > > not split, if you meant to imply that they do)? That would

Re: [Python-ideas] Proposal: Tuple of str with w'list of words'

2016-12-06 Thread Random832
On Tue, Dec 6, 2016, at 20:03, Steven D'Aprano wrote: > > I also have an alternate idea: sl{word1 word2 'string 3' "string 4"} > > Why "sl"? Well, shlex was one of the inspirations. > That looks like a set or a dict. Its bad enough that w-strings return a > list, but to have "sl-sets" return a

Re: [Python-ideas] Proposal: Tuple of str with w'list of words'

2016-12-06 Thread Stephen J. Turnbull
Random832 writes: > I don't understand what this "after splitting" you're talking about > is. It would be a single pass through the characters of the token, Which may as well be thought of as a string (not a str). Although you can implement this process in one pass, you can also think of it i