File: _infra.py

package info (click to toggle)
python-w3lib 2.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 396 kB
  • sloc: python: 3,141; makefile: 133
file content (13 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
# https://infra.spec.whatwg.org/

import string

# https://infra.spec.whatwg.org/commit-snapshots/59e0d16c1e3ba0e77c6a60bfc69a0929b8ffaa5d/#code-points
_ASCII_TAB_OR_NEWLINE = "\t\n\r"
_ASCII_WHITESPACE = "\t\n\x0c\r "
_C0_CONTROL = "".join(chr(n) for n in range(32))
_C0_CONTROL_OR_SPACE = _C0_CONTROL + " "
_ASCII_DIGIT = string.digits
_ASCII_HEX_DIGIT = string.hexdigits
_ASCII_ALPHA = string.ascii_letters
_ASCII_ALPHANUMERIC = string.ascii_letters + string.digits