![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /lib/python2.7/site-packages/past/utils/ |
� ,�]c @ s� d Z d d l Z d d l Z e j d d k Z e j d d k Z e e d � Z d � Z d � Z d � Z d d d d d d g Z d S( sj Various non-built-in utility functions and definitions for Py2 compatibility in Py3. For example: >>> # The old_div() function behaves like Python 2's / operator >>> # without "from __future__ import division" >>> from past.utils import old_div >>> old_div(3, 2) # like 3/2 in Py2 0 >>> old_div(3, 2.0) # like 3/2.0 in Py2 1.5 i����Ni i i t pypy_translation_infoc s/ d � f � � f d � � Y} | d d i � S( s� Function from jinja2/_compat.py. License: BSD. Use it like this:: class BaseForm(object): pass class FormType(type): pass class Form(with_metaclass(FormType, BaseForm)): pass This requires a bit of explanation: the basic idea is to make a dummy metaclass for one level of class instantiation that replaces itself with the actual metaclass. Because of internal type checks we also need to make sure that we downgrade the custom metaclass for one level to something closer to type (that's why __call__ and __init__ comes back from type etc.). This has the advantage over six.with_metaclass of not introducing dummy classes into the final MRO. t metaclassc s, e Z e j Z e j Z � � f d � Z RS( c s2 | d k r"