beeseek-devs team mailing list archive
-
beeseek-devs team
-
Mailing list archive
-
Message #00092
[Bug 312761] [NEW] _SignatureChecker gives a strange error when an attribute should be a method but it is not
Public bug reported:
_SignatureChecker in interfaces.py raises a strange error when an
interface requires an attribute to be a method, but it actually isn't.
For example, look at this code:
class MyInterface(Interface):
def mymethod(self): pass
class MyObject(object):
implements(MyInterface)
mymethod = 'string'
This will currently raise AttributeError("'str' object has no attribute
'func_code'"). However this message is difficult to understand. It would
be useful to raise a more detailed exception and this can be done by
checking the type of ``attrs[name]`` in interfaces.py.
** Affects: beeseek-base
Importance: Wishlist
Status: Triaged
** Tags: trivial
** Changed in: beeseek-base
Importance: Undecided => Wishlist
Status: New => Triaged
** Tags added: trivial
--
_SignatureChecker gives a strange error when an attribute should be a method but it is not
https://bugs.launchpad.net/bugs/312761
You received this bug notification because you are a member of BeeSeek
Developers, which is subscribed to BeeSeek Base.
Follow ups
References