mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-87390: Add __unpacked__ attribute to types.GenericAlias (#92059)
This commit is contained in:
parent
56f9844014
commit
ff88f7e007
4 changed files with 19 additions and 0 deletions
|
@ -516,6 +516,7 @@ ga_vectorcall(PyObject *self, PyObject *const *args,
|
|||
static const char* const attr_exceptions[] = {
|
||||
"__origin__",
|
||||
"__args__",
|
||||
"__unpacked__",
|
||||
"__parameters__",
|
||||
"__mro_entries__",
|
||||
"__reduce_ex__", // needed so we don't look up object.__reduce_ex__
|
||||
|
@ -657,6 +658,7 @@ static PyMethodDef ga_methods[] = {
|
|||
static PyMemberDef ga_members[] = {
|
||||
{"__origin__", T_OBJECT, offsetof(gaobject, origin), READONLY},
|
||||
{"__args__", T_OBJECT, offsetof(gaobject, args), READONLY},
|
||||
{"__unpacked__", T_BOOL, offsetof(gaobject, starred), READONLY},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue