Spade

Mini Shell

Directory:~$ /proc/self/root/usr/lib64/python2.7/site-packages/zope/interface/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/usr/lib64/python2.7/site-packages/zope/interface/verify.pyc

�
j�/Qc@s�dZddlmZmZddlmZddlmZmZddlm	Z	m
Z
mZddlZefZ
ddd�Zdd	�Zdd
�Zd�ZdS(s!Verify interface implementations
i����(tBrokenImplementationtDoesNotImplement(tBrokenMethodImplementation(tFunctionTypet
MethodType(t
fromMethodtfromFunctiontMethodNic
Cs�|dkr|j}n	|j}|rD||�rDt|��nx�|jd�D]�\}}yt||�}WnBtk
r�t|t�r�|dkr�qTnt||��nXt|t�s�qTnt|t	�r4t
jddkrt|t�rt
||d|dd�}q�t
||d|�}n{t|t�rmt|j�t	krmt|||�}nBt|t�r�|dkr�qTn!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
isinstanceRRRtsystversionttypeRtMethodTypest__func__RtpropertytcallableRtgetSignatureInfot	_incompattTrue(
tifacet	candidatet	tentativetvtypettesterR
tdesctattrtmethtmess((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pyt_verifysB	
"cCst|||dd�S(NRR(R%(RRR((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pytverifyClassescCst|||dd�S(NRto(R%(RRR((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pytverifyObjecthscCs�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((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pyRks

(t__doc__tzope.interface.exceptionsRRRttypesRRtzope.interface.interfaceRRRRRtNoneR%R&R(R(((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pyt<module>s	J