MCPcopy Create free account
hub / github.com/mininet/mininet / custom

Function custom

mininet/util.py:598–608  ·  view source on GitHub ↗

Returns customized constructor for class cls.

( cls, **params )

Source from the content-addressed store, hash-verified

596 return range( start, end + 1 )
597
598def custom( cls, **params ):
599 "Returns customized constructor for class cls."
600 # Note: we may wish to see if we can use functools.partial() here
601 # and in customConstructor
602 def customized( *args, **kwargs):
603 "Customized constructor"
604 kwargs = kwargs.copy()
605 kwargs.update( params )
606 return cls( *args, **kwargs )
607 customized.__name__ = 'custom(%s,%s)' % ( cls, params )
608 return customized
609
610def splitArgs( argstr ):
611 """Split argument string into usable python arguments

Callers 4

limitFunction · 0.90
verySimpleLimitFunction · 0.90
miniedit.pyFile · 0.90
bwtestFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected