← Back
Editing: reorder.cpython-311.pyc
� cR�a � �p � d Z ddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZ d� Z G d� d e� � ZdS ) �E Reorder top-level functions to prevent circular type dependencies. � N)�OrderedGlobalDeclarations)�Transformation)�PythranSyntaxError)�TypeDependenciesc �^ � t � � }g }t � � }|�| � � � }|D ]�}||v r�|g}|r�|d }||v r|� � � �#|� |� � g }| | D ]6} | |vr0| |v rt j d| z � � �|� | � � �7|r|� |� � n>|� |� � |� |� � |� � � |�ό�t t |� � � � S )N���zGraph contains a cycle at %s.) �set�nodes�pop�add�graph� Unfeasible�append�extend�list�reversed) �G�nbunch�seen�order�explored�v�fringe�w� new_nodes�ns �7/usr/lib/python3/dist-packages/pythran/types/reorder.py�topological_sortr sP � ��5�5�D��E��u�u�H� �~������� � � ����=�=������ ��r� �A��H�}�}�� � ������H�H�Q�K�K�K��I��q�T� (� (���H�$�$��D�y�y�#�.�;�a�?�A� A� A��$�$�Q�'�'�'��� �� � �i�(�(�(�(����Q�������Q����� � ����'