Add custom name to customized functions.
Note: we could probably use functools.partial.
This commit is contained in:
@@ -399,6 +399,7 @@ def custom( cls, **params ):
|
|||||||
"Customized constructor"
|
"Customized constructor"
|
||||||
kwargs.update( params )
|
kwargs.update( params )
|
||||||
return cls( *args, **kwargs )
|
return cls( *args, **kwargs )
|
||||||
|
customized.__name__ = 'custom(%s,%s)' % ( cls, params )
|
||||||
return customized
|
return customized
|
||||||
|
|
||||||
def splitArgs( argstr ):
|
def splitArgs( argstr ):
|
||||||
@@ -439,6 +440,7 @@ def customConstructor( constructors, argStr ):
|
|||||||
constructor, args, newargs ) )
|
constructor, args, newargs ) )
|
||||||
return constructor( name, *newargs, **params )
|
return constructor( name, *newargs, **params )
|
||||||
|
|
||||||
|
customized.__name__ = 'customConstructor(%s)' % argStr
|
||||||
return customized
|
return customized
|
||||||
|
|
||||||
def buildTopo( topos, topoStr ):
|
def buildTopo( topos, topoStr ):
|
||||||
|
|||||||
Reference in New Issue
Block a user