Here k corresponds to a class. Hence k(self) corresponds to creating an
instance of the class referred to by k passing self as the first
parameter, which results in an object.
On 07/07/2020 06:33, Kiny Wan wrote:
> Hi Freddie and everyone,
> The more you learn, the more problems you encounter! Today, I
> want to discuss about a python operation in backend/openmp/base.py,
> which is very advanced. The code is shown as follow:
> # Instantiate mandatory kernel provider classes
> kprovcls = [provider.OpenMPPointwiseKernelProvider,
> self._providers = [k(*self*) for k in kprovcls]
> The '*self*' is brought into the class 'k'.
> Using print function, I found that k(*self*) represents object and k
> denotes class. *I am wondering what impact this will have? *
> <pyfr.backends.openmp.provider.OpenMPPointwiseKernelProvider object at
> <class 'pyfr.backends.openmp.provider.OpenMPPointwiseKernelProvider'>
> You received this message because you are subscribed to the Google
> Groups "PyFR Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pyfrmailingli...@googlegroups.com
> To view this discussion on the web, visit