Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/zope/interface/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/zope/interface/verify.pyc

ó
ÔËÞKc@s§dZddlmZmZddlmZddlmZmZddlm	Z	m
Z
mZddlZefZ
ddd„Zdd	„Zdd
„Zd„ZdS(sWVerify interface implementations

$Id: verify.py 110699 2010-04-09 08:16:17Z regebro $
iÿÿÿÿ(tBrokenImplementationtDoesNotImplement(tBrokenMethodImplementation(tFunctionTypet
MethodType(t
fromMethodtfromFunctiontMethodNic
CsÕ|dkr|j}n	|j}|rD||ƒrDt|ƒ‚nxŠ|jdƒD]y\}}yt||ƒ}WnBtk
r·t|tƒr¥|dkr¥qTnt||ƒ‚nXt|tƒsÍqTnt|t	ƒr4t
jddkrt|tƒrt
||d|ddƒ}qŽt
||d|ƒ}nZt|tƒrmt|jƒt	krmt|||ƒ}n!t|ƒsTt|dƒ‚qTqT|jƒ}|jƒ}t||ƒ}	|	rTt||	ƒ‚qTqTWtS(sÍVerify that 'candidate' might correctly implements 'iface'.

    This involves:

      o Making sure the candidate defines all the necessary methods

      o Making sure the methods have the correct signature

      o Making sure the candidate asserts that it implements the interface

    Note that this isn't the same as verifying that the class does
    implement the interface.

    If optional tentative is true, suppress the "is implemented by" test.
    tciit3tnametimlevelsNot a method(t
implementedByt
providedByRtnamesAndDescriptionstgetattrtAttributeErrort
isinstanceRRRtsystversionttypeRtMethodTypestim_funcRtcallableRtgetSignatureInfot	_incompattTrue(
tifacet	candidatet	tentativetvtypettesterR
tdesctattrtmethtmess((s9/usr/lib/python2.7/dist-packages/zope/interface/verify.pyt_verifys<	
"cCst|||ddƒS(NRR(R$(RRR((s9/usr/lib/python2.7/dist-packages/zope/interface/verify.pytverifyClassbscCst|||ddƒS(NRto(R$(RRR((s9/usr/lib/python2.7/dist-packages/zope/interface/verify.pytverifyObjectescCs‰t|dƒt|dƒkr$dSt|dƒt|dƒkrS|drSdS|drl|drldS|dr…|dr…dSdS(	Ntrequireds*implementation requires too many argumentst
positionaltvarargss-implementation doesn't allow enough argumentstkwargss0implementation doesn't support keyword argumentss1implementation doesn't support variable arguments(tlen(R(timplemented((s9/usr/lib/python2.7/dist-packages/zope/interface/verify.pyRhs  (t__doc__tzope.interface.exceptionsRRRttypesRRtzope.interface.interfaceRRRRRtNoneR$R%R'R(((s9/usr/lib/python2.7/dist-packages/zope/interface/verify.pyt<module>s	E