|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /lib64/python2.7/site-packages/django/utils/ |
Upload File : |
�
r�\c @ s? d d l Z d d l Z d d l m Z d d l Z d d l m Z d d l m Z d � Z d � Z
d e f d � � YZ d e f d
� � YZ
d � Z d � Z d
� Z e � Z d � Z d e f d � � YZ e Z d e f d � � YZ d e f d � � YZ d � Z e j d k r2d d l m Z n d � Z d S( i����N( t wraps( t six( t copyregc s � � � f d � } | S( Nc s � � | t � | � � S( N( t dict( t moreargst
morekwargs( t
_curried_funct argst kwargs( s9 /tmp/pip-install-XxeQeY/django/django/utils/functional.pyt _curried s ( ( R R R R ( ( R R R s9 /tmp/pip-install-XxeQeY/django/django/utils/functional.pyt curry
s c s% t � � � � � f d � � } | S( s�
Wrap a function so that results for any argument tuple are stored in
'cache'. Note that the args to the function must be usable as dictionary
keys.
Only the first num_args are considered when creating the key.
c s8 | � } | � k r � | S� | � } | � | <| S( N( ( R t mem_argst result( t cachet funct num_args( s9 /tmp/pip-install-XxeQeY/django/django/utils/functional.pyt wrapper s
( R ( R R
R R ( ( R
R R s9 /tmp/pip-install-XxeQeY/django/django/utils/functional.pyt memoize s !t cached_propertyc B s# e Z d Z d � Z d d � Z RS( sr
Decorator that converts a method with a single self argument into a
property cached on the instance.
c C s
| | _ d S( N( R ( t selfR ( ( s9 /tmp/pip-install-XxeQeY/django/django/utils/functional.pyt __init__+ s c C s4 | d k r | S| j | � } | j | j j <| S( N( t NoneR t __dict__t __name__( R t instancet typet res( ( s9 /tmp/pip-install-XxeQeY/django/django/utils/functional.pyt __get__. s N( R t
__module__t __doc__R R R ( ( ( s9 /tmp/pip-install-XxeQeY/django/django/utils/functional.pyR &