On 04/04/2013 02:18, Michele Simionato wrote:
On Wednesday, April 3, 2013 3:05:31 AM UTC+2, Rotwang wrote:
After thinking about it for a while I've come up with the following
abomination
Alas, there is actually no good way to implement this feature in pure
Python without abominations. Interna
On 03/04/2013 05:15, Steven D'Aprano wrote:
On Wed, 03 Apr 2013 02:05:31 +0100, Rotwang wrote:
Hi all,
Here's a Python problem I've come up against and my crappy solution.
Hopefully someone here can suggest something better. I want to decorate
a bunch of functions with different signatures;
[
On 03/04/2013 02:05, Rotwang wrote:
[...]
After thinking about it for a while I've come up with the following
abomination:
import inspect
def sigwrapper(sig):
if not isinstance(sig, inspect.Signature):
sig = inspect.signature(sig)
def wrapper(f):
ps = 'args = []\n\t\t'
ks
On Wednesday, April 3, 2013 3:05:31 AM UTC+2, Rotwang wrote:
> After thinking about it for a while I've come up with the following
>
> abomination
Alas, there is actually no good way to implement this feature in pure Python
without abominations. Internally the decorator module does something s
On 03.04.2013 04:05, Rotwang wrote:
Hi all,
Here's a Python problem I've come up against and my crappy solution.
Hopefully someone here can suggest something better. I want to decorate
a bunch of functions with different signatures; for example, I might
want to add some keyword-only arguments to
On Wed, 03 Apr 2013 02:05:31 +0100, Rotwang wrote:
> Hi all,
>
> Here's a Python problem I've come up against and my crappy solution.
> Hopefully someone here can suggest something better. I want to decorate
> a bunch of functions with different signatures;
[...]
> After thinking about it for a w
Hi all,
Here's a Python problem I've come up against and my crappy solution.
Hopefully someone here can suggest something better. I want to decorate
a bunch of functions with different signatures; for example, I might
want to add some keyword-only arguments to all functions that return
instan