Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-17 Thread Stephen J. Turnbull
Nick Coghlan writes: > str and bytes aren't going to implement __fspath__ (since they're > only *sometimes* path objects), so asking people to call the > protocol method directly for any purpose would be a pain. It *should* be a pain. People who need bytes should call fsencode, people who nee

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-17 Thread Nick Coghlan
On 17 April 2016 at 18:03, Stephen J. Turnbull wrote: > Nick Coghlan writes: > > and instead throw exceptions in those cases. > > Then I don't understand the current design of fsdecode and fsencode. > Shouldn't they raise on str and bytes respectively, rather than > passing them through? In gen

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-17 Thread Koos Zevenhoven
On Sun, Apr 17, 2016 at 11:03 AM, Stephen J. Turnbull wrote: > Nick Coghlan writes: > > > str and bytes aren't going to implement __fspath__ (since they're > > only *sometimes* path objects), so asking people to call the > > protocol method directly for any purpose would be a pain. > > It *shou

Re: [Python-Dev] Wordcode: new regular bytecode using 16-bit units

2016-04-17 Thread Eric Fahlgren
Just on the off chance that it’s related, could it have something to do with the bug in findlabels? http://bugs.python.org/issue26448 (I have high confidence that my patch fixes the problem, just haven’t gotten around to completing the tests.) From: Demur Rumed [mailto:gunkm...@gmail.

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-17 Thread Ethan Furman
On 04/17/2016 06:58 AM, Koos Zevenhoven wrote: So, as a summary: With a str+bytes-polymorphic __fspath__, with the above argumentation and the rough implementation of os.fspath(...), the conclusion is that the os.fspath function should indeed be public, and that no further variations are needed.

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-17 Thread Koos Zevenhoven
On Sun, Apr 17, 2016 at 9:14 PM, Ethan Furman wrote: > On 04/17/2016 06:58 AM, Koos Zevenhoven wrote: > >> So, as a summary: With a str+bytes-polymorphic __fspath__, with the >> above argumentation and the rough implementation of os.fspath(...), >> the conclusion is that the os.fspath function sho

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-17 Thread Chris Angelico
On Mon, Apr 18, 2016 at 7:05 AM, Koos Zevenhoven wrote: > On Sun, Apr 17, 2016 at 9:14 PM, Ethan Furman wrote: >> On 04/17/2016 06:58 AM, Koos Zevenhoven wrote: >> >>> So, as a summary: With a str+bytes-polymorphic __fspath__, with the >>> above argumentation and the rough implementation of os.fs

Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016-04-17 Thread Ethan Furman
On 04/17/2016 02:05 PM, Koos Zevenhoven wrote: On Sun, Apr 17, 2016 at 9:14 PM, Ethan Furman wrote: On 04/17/2016 06:58 AM, Koos Zevenhoven wrote: So, as a summary: With a str+bytes-polymorphic __fspath__, with the above argumentation and the rough implementation of os.fspath(...), the conclu

[Python-Dev] My first post here ~ do you need more Python core developers on Windows?

2016-04-17 Thread Burkhard Meier
Hi, I just subscribed to the "Python-Dev" mailing list and the 'Welcome" reply asked me to introduce myself. My name is Burkhard Meier and I wrote the "Python GUI Programming Cookbook" published by Packt. It is available on Amazon and PacktPub.com. Maybe I can become more involved in the Python