def _default_globals():
    """Return a mapping of default and precomputed expressions.
    These default expressions are convenience defaults available when eveluating
    section headers expressions.
    NB: this is wrapped in a function so that the computing of these expressions
    is lazy and done only if needed (ie if there is at least one section with
    an expression) because the computing of some of these expressions can be
    expensive.
    """
    import sys
    import os
    import platform
    import re
    globals_defs = {'sys': sys, 'os': os, 'platform': platform, 're': re}
    major_python_versions = tuple(map(str, platform.python_version_tuple()))
    globals_defs.update({'python2': major_python_versions[0] == '2',
        'python3': major_python_versions[0] == '3'})
    minor_python_versions = ('24', '25', '26', '27', '30', '31', '32', '33',
        '34', '35', '36')
    for v in minor_python_versions:
        globals_defs['python' + v] = ''.join(major_python_versions[:2]) == v
    sys_version = sys.version.lower()
    pypy = 'pypy' in sys_version
    jython = 'java' in sys_version
    ironpython = 'iron' in sys_version
    cpython = not any((pypy, jython, ironpython))
    globals_defs.update({'cpython': cpython, 'pypy': pypy, 'jython': jython,
        'ironpython': ironpython})
    sys_platform = str(sys.platform).lower()
    globals_defs.update({'linux': 'linux' in sys_platform, 'windows': 
        'win32' in sys_platform, 'cygwin': 'cygwin' in sys_platform,
        'solaris': 'sunos' in sys_platform, 'macosx': 'darwin' in
        sys_platform, 'posix': 'posix' in os.name.lower()})
    import struct
    void_ptr_size = struct.calcsize('P') * 8
    globals_defs.update({'bits32': void_ptr_size == 32, 'bits64': 
        void_ptr_size == 64, 'little_endian': sys.byteorder == 'little',
        'big_endian': sys.byteorder == 'big'})
    return globals_defs
