Re: [Python-Dev] limited_api and datetime

2017-08-22 Thread Nick Coghlan
On 23 August 2017 at 00:09, stackless wrote: > Hi again, > > I am trying to support the limited Api (PEP 384) for PySide. Fortunately, > everything worked out of the box, just the datetime module gives me > a problem. Inspection showed that datetime is completely removed >

Re: [Python-Dev] PEP 550 v3 naming

2017-08-22 Thread Nathaniel Smith
On Tue, Aug 22, 2017 at 8:51 PM, Guido van Rossum wrote: > On Tue, Aug 22, 2017 at 7:12 PM, Nathaniel Smith wrote: >> >> We could do worse than just plain Context and ContextStack, for that >> matter. > > > I worry that that's going to lead more people astray

Re: [Python-Dev] PEP 550 v3 naming

2017-08-22 Thread Guido van Rossum
On Tue, Aug 22, 2017 at 7:12 PM, Nathaniel Smith wrote: > We could do worse than just plain Context and ContextStack, for that > matter. > I worry that that's going to lead more people astray thinking this has something to do with contextlib, which it really doesn't (it's much

Re: [Python-Dev] PEP 550 v3 naming

2017-08-22 Thread Nathaniel Smith
On Tue, Aug 22, 2017 at 8:22 AM, Guido van Rossum wrote: > As I understand the key APIs and constraints of the proposal better, I'm > leaning towards FooContext (LC) and FooContextStack (EC), for some value of > Foo that I haven't determined yet. Perhaps the latter can be

Re: [Python-Dev] PEP 550 v3 naming

2017-08-22 Thread MRAB
On 2017-08-23 00:12, Greg Ewing wrote: Guido van Rossum wrote: Perhaps the latter can be shortened to just ContextStack (since the Foo part can probably be guessed from context. :-) -0.9, if I saw something called ContextStack turn up in a traceback I wouldn't necessarily jump to the

Re: [Python-Dev] PEP 550 v3 naming

2017-08-22 Thread Greg Ewing
Guido van Rossum wrote: Perhaps the latter can be shortened to just ContextStack (since the Foo part can probably be guessed from context. :-) -0.9, if I saw something called ContextStack turn up in a traceback I wouldn't necessarily jump to the conclusion that it was a stack of FooContexts

Re: [Python-Dev] PEP 550 v3

2017-08-22 Thread Guido van Rossum
On Mon, Aug 21, 2017 at 10:09 PM, Nick Coghlan wrote: > My latest suggestion to Yury was to see how the PEP reads with it > called ImplicitContext, such that: > > * the active execution context is a stack of implicit contexts > * ContextKey.set() updates the innermost

Re: [Python-Dev] PEP 550 v3 naming

2017-08-22 Thread Guido van Rossum
As I understand the key APIs and constraints of the proposal better, I'm leaning towards FooContext (LC) and FooContextStack (EC), for some value of Foo that I haven't determined yet. Perhaps the latter can be shortened to just ContextStack (since the Foo part can probably be guessed from context.

[Python-Dev] limited_api and datetime

2017-08-22 Thread stackless
Hi again, I am trying to support the limited Api (PEP 384) for PySide. Fortunately, everything worked out of the box, just the datetime module gives me a problem. Inspection showed that datetime is completely removed when the limitation is set. Can somebody enlighten me why that needs to be

Re: [Python-Dev] PEP 550 v3

2017-08-22 Thread Yury Selivanov
On Tue, Aug 22, 2017 at 2:06 AM, Koos Zevenhoven wrote: [..] >> There will be an optimization: if the LC is empty, we will push NULL >> to the stack, thus avoiding the cost of allocating an object. >> > But if LCs are immutable, there needs to be only one empty-LC instance.

Re: [Python-Dev] PEP 550 v3

2017-08-22 Thread Koos Zevenhoven
On Tue, Aug 22, 2017 at 12:44 AM, Yury Selivanov wrote: > On Mon, Aug 21, 2017 at 5:39 PM, Koos Zevenhoven > wrote: > [..] > >> In the current version of the PEP, generators are initialized with an > >> empty LogicalContext. When they are being