> get_permissions(item, request, obj) > > and then simply write > > ** get_permissions(item, request, obj) > > in the function call, to pass the permissions to the called function. > By the way, for ease of use this is relying on > > https://www.python.org/dev/peps/pep-0448/ # Additional Unpacking > Generalizations > > which allows multiple **kwargs in a function call. It was implemented > in Python 3.5. > > By the way, Django 1.11 and 2.0 are still supported by Django, and > they both support Python 3.4. So we'll have to wait for a bit before > Django could accept this suggestion. A dict merge is fairly trivial to implement to get even 2.7 support so no need to be that restrictive. This is a good fix for this case. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
- [Python-ideas] Improving fn(arg=arg, name=name, wibble=w... Jonathan Fine
- Re: [Python-ideas] Improving fn(arg=arg, name=name,... Anders Hovmöller
- Re: [Python-ideas] Improving fn(arg=arg, name=n... Chris Angelico
- Re: [Python-ideas] Improving fn(arg=arg, name=name,... Terry Reedy
- Re: [Python-ideas] Improving fn(arg=arg, name=n... Jonathan Fine
- Re: [Python-ideas] Improving fn(arg=arg, na... Jonathan Fine
- Re: [Python-ideas] Improving fn(arg=arg... Anders Hovmöller
- Re: [Python-ideas] Improving fn(ar... Jonathan Fine
- Re: [Python-ideas] Improving fn(arg=arg, name=name,... Michael Selik
- Re: [Python-ideas] Improving fn(arg=arg, name=n... Jonathan Fine
- Re: [Python-ideas] Improving fn(arg=arg, na... Anders Hovmöller
- Re: [Python-ideas] Improving fn(arg=arg... Michael Selik
- Re: [Python-ideas] Improving fn(ar... Anders Hovmöller
- Re: [Python-ideas] Improving f... Jonathan Fine
- Re: [Python-ideas] Improvi... Anders Hovmöller
- Re: [Python-ideas] Improvi... Michael Selik
- Re: [Python-ideas] Improvi... Anders Hovmöller