I have a large existing program library that currently has a .NET binding, and I\'m thinking about writing a Python binding. The existing API makes extensive use of signatur
You could use a dictionary, like so
Circle({'points':[p1,p2,p3]})
Circle({'radius':r})
Circle({'curves':[c1,c2,c3])
And the initializer would say
def __init__(args):
if len(args)>1:
raise SomeError("only pass one of points, radius, curves")
if 'points' in args: {blah}
elsif 'radius' in args: {blahblah}
elsif 'curves' in args: {evenmoreblah}
else: raise SomeError("same as above")