Re: Potential deprecation in RHEL 7.3 ADDON API
Jiří Konečný <[email protected]> Thu, 31 Mar 2016 12:13:44 +0200
| Newsgroups | gmane.linux.redhat.anaconda.devel |
|---|---|
| Organization | Red Hat |
| Message-ID | <[email protected]> |
On Thu, 2016-03-31 at 09:39 +0300, Alexander Todorov wrote: > На 30.03.2016 в 16:02, Martin Kolman написа: > > > > 2) Use the inspect module to check if the method expects the > > payload kwarg (or **kwargs) > > and only call it with it if it does. Note that this is ultra-bleh- > > hacky and probably > > also pretty un-Pythonic. > > > I've tried this approach before. Info and examples here: > > http://atodorov.org/blog/2015/11/29/inspecting-method-arguments-in-py > thon/ > > > I will work but indeed looks quite hacky. > I'm using now similar approach than you. But without the **kwargs and *args solution and without the need to import inspect. However from my understanding inspect module is doing the same as me. I'm only using attributes from this table https://docs.python.org/2/library/inspect.html . Jirka > > -- > Alex > > _______________________________________________ > Anaconda-devel-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/anaconda-devel-list _______________________________________________ Anaconda-devel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/anaconda-devel-list