Ë
    š”e2  ã                   ó>   — d Z ddlmZ g d¢ZddlZd„ Zd„ Zd	d„Zd„ Zy)
aj  Class advice.

This module was adapted from 'protocols.advice', part of the Python
Enterprise Application Kit (PEAK).  Please notify the PEAK authors
(pje@telecommunity.com and tsarna@sarna.org) if bugs are found or
Zope-specific changes are required, so that the PEAK version of this module
can be kept in sync.

PEAK is a Python application framework that interoperates with (but does
not require) Zope 3 and Twisted.  It provides tools for manipulating UML
models, object-relational persistence, aspect-oriented programming, and more.
Visit the PEAK home page at http://peak.telecommunity.com for more information.
é    )ÚFunctionType)ÚdetermineMetaclassÚgetFrameInfoÚisClassAdvisorÚminimalBasesNc                 ó,  — | j                   }| j                  }||u }d|v }d|v }|xr |}|xr |d   |d   k(  }|xr" t        j                  j	                  |d   «      xs d}|xr |j
                  |u }|sd}	n|r|sd}	n|r|sd}	n|sd}	nd}	|	|||fS )	z„Return (kind,module,locals,globals) for a frame

    'kind' is one of "exec", "module", "class", "function call", or "unknown".
    Ú
__module__Ú__name__NÚexecÚmoduleÚclasszfunction callÚunknown)Úf_localsÚ	f_globalsÚsysÚmodulesÚgetÚ__dict__)
Úframer   r   ÚsameNamespaceÚ	hasModuleÚhasNameÚsameNamer   ÚnamespaceIsModuleÚkinds
             ú7/usr/lib/python3/dist-packages/zope/interface/advice.pyr   r   '   sÆ   € ð �~‰~€HØ—‘€Ià 	Ð)€MØ Ð(€IØ˜IÐ%€GàÒ$˜W€HØÒI˜I jÑ1°8¸LÑ3IÑI€HàÒ?œŸ™Ÿ™¨°:Ñ)>Ó?ÒGÀ4€FàÒ? 6§?¡?°iÐ#?Ðáà‰Ù	™yØ‰Ù	™-Ø‰ÙØ‰ð ˆØ�˜ 9Ð,Ð,ó    c                 ó>   — t        | t        «      xr t        | d«      S )z(True if 'ob' is a class advisor functionÚpreviousMetaclass)Ú
isinstancer   Úhasattr)Úobs    r   r   r   K   s   € ä�bœÓ&ÒJ¬7°2Ð6IÓ+JÐJr   c           
      óò   — | D �cg c]  }t        |dt        |«      «      ‘Œ }}|�|j                  |«       t        |«      dk(  r|d   S t	        |«      }t        |«      dkD  rt        d| «      ‚|d   S c c}w )zEDetermine metaclass from 1+ bases and optional explicit __metaclass__Ú	__class__é   r   zIncompatible metatypes)ÚgetattrÚtypeÚappendÚlenr   Ú	TypeError)ÚbasesÚexplicit_mcÚbÚmetaÚ
candidatess        r   r   r   P   s�   € ð 5:Ö:¨qŒG�A�k¤$ q£'Õ*Ð:€DÐ:àÐð 	�‰�KÔ ä
ˆ4ƒy�!‚|à�A‰wˆä˜dÓ#€Jä
ˆ:ƒ�qÒäÐ0°%Ó8Ð8ð �a‰=Ðùò% ;s   …A4c                 ó˜   — g }| D ]B  }| D ]  }t        ||«      sŒ||usŒ Œ ||v r|j                  |«       |j                  |«       ŒD |S )z?Reduce a list of base classes to its ordered minimum equivalent)Ú
issubclassÚremover(   )Úclassesr/   ÚmÚns       r   r   r   h   sd   € à€Jàò !ˆØò 	!ˆAÜ˜!˜A� 1¨A¢:Ùð	!ð
 �J‰Ø×!Ñ! !Ô$Ø×Ñ˜aÕ ð!ð Ðr   )N)	Ú__doc__Útypesr   Ú__all__r   r   r   r   r   © r   r   ú<module>r:      s1   ðñõ ò€ó ò!-òHKó
ó0r   