[issue44845] Allow keyword arguments in code.__new__

2021-11-19 Thread Patrick Reader


Change by Patrick Reader :


--
nosy:  -terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44845] Allow keyword arguments in code.__new__

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -27890

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44845] Allow keyword arguments in code.__new__

2021-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +terry.reedy
nosy_count: 2.0 -> 3.0
pull_requests: +27890
pull_request: https://github.com/python/cpython/pull/29651

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44845] Allow keyword arguments in code.__new__

2021-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Generally, construction time is faster if the arguments are positional only.  

Also, this isn't a method that people typically call directly — it is only 
quasi-public because the layout of the codestring is implementation dependent 
and changes every now and then.   Given that it is essentially private, there 
is no benefit to exposing keyword argument calls.

Thanks for the suggestion, but I don't think it makes things better for users.

--
nosy: +rhettinger
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44845] Allow keyword arguments in code.__new__

2021-08-05 Thread Patrick Reader


New submission from Patrick Reader :

Per bpo-41263, code.__new__ now uses Argument Clinic. However, it still has a / 
marker which prevents the use of keyword arguments 
(https://github.com/python/cpython/pull/21426/files#diff-6f869eb8beb7cbe4bc6817584b99ad567f88962fa67f7beca25d009dc401234dR465).

It seems entirely unnecessary to have this, so could it be removed to allow 
easier construction of code objects from user code, or is it there for some 
specific reason?

I can do a PR - it's a 1 line change (+ clinic output changes) (+ tests?).

I don't imagine backwards-compatibility is a concern here given it's 
implementation-specific and basically private.

Note that prior to that fix, keyword arguments were allowed in the constructor 
but completely ignored.

--
components: Interpreter Core
messages: 399034
nosy: pxeger
priority: normal
severity: normal
status: open
title: Allow keyword arguments in code.__new__
type: enhancement
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com