File: _compat.py

package info (click to toggle)
flask-peewee 3.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,136 kB
  • sloc: javascript: 9,322; python: 3,904; makefile: 135; sh: 16
file content (15 lines) | stat: -rw-r--r-- 253 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import sys


PY2 = sys.version_info[0] == 2

if PY2:
    text_type = unicode
    string_types = (str, unicode)
    unichr = unichr
    reduce = reduce
else:
    text_type = str
    string_types = (str,)
    unichr = chr
    from functools import reduce