MINI MINI MANI MO
3
  \                 @   sn   d Z ddlZddlZddlZddlZdddgZdddZi add Zddd	Z	dd
dZ
dddZd
d ZdS )zCache lines from Python source files.
This is intended to read lines from modules imported -- hence if a filename
is not found, it will look down the module search path for a file by
that name.
    Ngetline
clearcache
checkcachec             C   s:   t | |}d|  ko t|kn  r2||d  S dS d S )N    )getlineslen)filenamelinenomodule_globalslines r
   !/usr/lib64/python3.6/linecache.pyr      s    
c               C   s   i a dS )zClear the cache entirely.N)cacher
   r
   r
   r   r      s    c             C   sR   | t kr(t |  }t|dkr(t |  d S y
t| |S  tk
rL   t  g S X dS )zGet the lines for a Python source file from the cache.
    Update the cache if it doesn't contain an entry for this file already.r      N)r   r   updatecacheMemoryErrorr   )r	   r   entryr
   r
   r   r   %   s    
r   c             C   s   | dkrt tj }n| tkr&| g}ndS x~|D ]v} t|  }t|dkrJq0|\}}}}|dkr`q0ytj|}W n tk
r   t| = w0Y nX ||jks||jkr0t| = q0W dS )zUDiscard cache entries that are out of date.
    (This is not checked upon each call!)Nr   )	listr   keysr   osstatOSErrorst_sizest_mtime)r	   	filenamesr   sizemtimer   fullnamer   r
   r
   r   r   5   s&