Re: [Python-Dev] PEP 487: Simpler customization of class creation

2016-06-20 Thread Nikita Nemkin
On Mon, Jun 20, 2016 at 9:48 PM, Guido van Rossum <gu...@python.org> wrote: > On Thu, Jun 16, 2016 at 3:24 PM, Nikita Nemkin <nik...@nemkin.ru> wrote: >> >> I didin't know that PyPy has actually implemented packed ordered dicts! >> >> https://morepypy

Re: [Python-Dev] PEP 487: Simpler customization of class creation

2016-06-16 Thread Nikita Nemkin
On Fri, Jun 17, 2016 at 2:36 AM, Nick Coghlan wrote: > On 16 June 2016 at 14:17, Martin Teichmann wrote: > An implementation like PyPy, with an inherently ordered standard dict > implementation, can just rely on that rather than being obliged to >

Re: [Python-Dev] PEP 520: Ordered Class Definition Namespace

2016-06-16 Thread Nikita Nemkin
-the-runtime. If you disagree with this premise, there's no point arguing about the alternatives. That being said, below are the answers to your objections to specific alternatives. On Thu, Jun 16, 2016 at 1:30 AM, Nick Coghlan <ncogh...@gmail.com> wrote: > On 14 June 2016 at 02:41, Nikita Ne

Re: [Python-Dev] PEP 520: Ordered Class Definition Namespace

2016-06-14 Thread Nikita Nemkin
Is there any rationale for rejecting alternatives like: 1. Adding standard metaclass with ordered namespace. 2. Adding `namespace` or `ordered` args to the default metaclass. 3. Making compiler fill in __definition_order__ for every class (just like __qualname__) without touching the runtime.

Re: [Python-Dev] MAKE_FUNCTION simplification

2016-04-14 Thread Nikita Nemkin
On Thu, Apr 14, 2016 at 8:27 PM, Guido van Rossum wrote: > Great analysis! What might stand in the way of adoption is concern for > bytecode manipulation libraries that would have to be changed. What > might encourage adoption would be a benchmark showing this saves a lot > of

Re: [Python-Dev] MAKE_FUNCTION simplification

2016-04-14 Thread Nikita Nemkin
On Thu, Apr 14, 2016 at 8:32 PM, Victor Stinner wrote: > > Would you like to work on a patch to implement that change? I'll work on a patch. Should I post it to bugs.python.org? > Since Python 3.6 may get a new bytecode format (wordcode, see the > other thread on this

[Python-Dev] MAKE_FUNCTION simplification

2016-04-14 Thread Nikita Nemkin
MAKE_FUNCTION opcode is complex due to the way it receives input arguments: 1) default args, individually; 2) default kwonly args, individual name-value pairs; 3) a tuple of parameter names (single constant); 4) annotation values, individually; 5) code object; 6) qualname. The counts for