it appears that the first elif below should simply be an if. This blows on import using either python 2 or 3
class IpxactBool(str):
def new(cls, *args, **kwargs):
if not args:
return None
expr = args[0].strip(' \t\n\r')
elif expr in ['true', 'false']:
return super(IpxactBool, cls).new(cls, expr)
else:
raise Exception
I'm surprised this got passed even the most basic of testing. Makes me think I'm doing something wrong. Sorry if this is a red herring.
No, you're absolutely right. This was an error and I'm also not sure how it managed to slip through. It has been fixed since then, though. Thank you for the report
it appears that the first elif below should simply be an if. This blows on import using either python 2 or 3 class IpxactBool(str): def new(cls, *args, **kwargs): if not args: return None expr = args[0].strip(' \t\n\r') elif expr in ['true', 'false']: return super(IpxactBool, cls).new(cls, expr) else: raise Exception
I'm surprised this got passed even the most basic of testing. Makes me think I'm doing something wrong. Sorry if this is a red herring.