Returns customized constructor for class cls.
( cls, **params )
| 596 | return range( start, end + 1 ) |
| 597 | |
| 598 | def 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 | |
| 610 | def splitArgs( argstr ): |
| 611 | """Split argument string into usable python arguments |
no outgoing calls
no test coverage detected