Open Quidge opened 3 years ago
Because the module arnparse shadows the package name + the module is imported in the init, it's not possible to import the MalformedArnError.
arnparse
MalformedArnError
I want to do this but can't at the moment:
from arnparse import arnparse, MalformedArnException ... try: arn = arnparse(<bad arn str>) except MalformedArnException as e: print(e.arn_str)
Nor is this possible:
import arnparse ... try: arn = arnparse.arnparse.arnparse(<bad arn str>) except arnparse.arnparse.MalformedArnException as e: print(e.arn_str)
Ideas? Like the lib and like the tests to outsource tricky string parsing stuff.
I think this should work....
from arnparse.arnparse import MalformedArnError
Because the module
arnparse
shadows the package name + the module is imported in the init, it's not possible to import theMalformedArnError
.I want to do this but can't at the moment:
Nor is this possible:
Ideas? Like the lib and like the tests to outsource tricky string parsing stuff.