>    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/

Reply via email to