[Python-ideas] parameter omit
Aaron Brady
castironpi at comcast.net
Mon May 14 04:28:23 CEST 2007
> -----Original Message-----
> From: python-ideas-bounces at python.org [mailto:python-ideas-
> bounces at python.org] On Behalf Of Aaron Brady
>
> class GuardDefault:
> Val= object()
> def __call__( self, *args, **kwargs ):
> args=list(args)
> for i,j in enumerate( args ):
> if j is GuardDefault.Val:
> offset=
> self.callable.func_code.co_argcount-\
> len(self.callable.func_defaults)
> args[i]=
> self.callable.func_defaults[i-offset]
> return self.callable( *args,**kwargs )
> def __init__( self,callable ):
> self.callable= callable
Do you have any interest in pursuing this?
More information about the Python-ideas
mailing list