Re: [Python-Dev] socket.setsockopt() with optval=NULL

2016-08-22 Thread Benjamin Peterson
Another option would be add a setalg method with whatever (nice, pythonic) API we want. Emulating the crummy C-level API needn't be a goal I think. On Sun, Aug 21, 2016, at 05:37, Christian Heimes wrote: > Hi, > > the socket.setsockopt(level, optname, value) method has two calling > variants.

Re: [Python-Dev] File system path encoding on Windows

2016-08-22 Thread Stephen J. Turnbull
Steve Dower writes: > The Windows world is Unicode. Mostly represented in UTF-16, but UTF-8 is > entirely equivalent. Sort of, yes, and not for present purposes. AFAICS, the Windows world is mostly application/* media that require substantial developer effort to extract text from; character

[Python-Dev] Deprecating invalid escape sequences: review request

2016-08-22 Thread Emanuel Barry
Hello Python-dev, some time ago I went ahead and implemented a patch to deprecate the invalid escape sequences (e.g. \c, \g, \h, etc.) in str and bytes literals. The change itself is pretty straightforward, and shouldn't be hard to review. The change was split in two patches; one which does the

Re: [Python-Dev] File system path encoding on Windows

2016-08-22 Thread eryk sun
On Mon, Aug 22, 2016 at 3:58 PM, Steve Dower wrote: > All MSVC users have been pushed towards Unicode for many years. The .NET > Framework has defaulted to UTF-8 its entire existence. The use of code pages > has been discouraged for decades. We're not going first :) I

Re: [Python-Dev] File system path encoding on Windows

2016-08-22 Thread Steve Dower
On 22Aug2016 0247, Stephen J. Turnbull wrote: Nick Coghlan writes: > On 21 August 2016 at 06:31, Steve Dower wrote: > > My biggest concern is that it then falls onto users to know how > > to start Python with that flag. The users I'm most worried about belong to

Re: [Python-Dev] Anyone know Brendan Scott, author of 'Python for Kids'?

2016-08-22 Thread Nick Coghlan
On 22 August 2016 at 07:22, Terry Reedy wrote: > So, if you agree with me, please either write Brendan personally if you know > him, or just leave your own comment on the blog. Brendan spoke at the inaugural PyCon Australia Education Seminar last year, so I've contacted him (cc

Re: [Python-Dev] File system path encoding on Windows

2016-08-22 Thread Stephen J. Turnbull
Nick Coghlan writes: > On 21 August 2016 at 06:31, Steve Dower wrote: > > My biggest concern is that it then falls onto users to know how > > to start Python with that flag. The users I'm most worried about belong to organizations where concerted effort has been made

Re: [Python-Dev] New calling convention to avoid temporarily tuples when calling functions

2016-08-22 Thread Victor Stinner
Hi, I pushed the most basic implementation of _PyObject_FastCall(), it doesn't support keyword parameters yet: https://hg.python.org/cpython/rev/a1a29d20f52d https://bugs.python.org/issue27128 Then I patched a lot of call sites calling PyObject_Call(), PyObject_CallObject(), PyEval_CallObject(),