File: datafunccodeobj.py

package info (click to toggle)
python-beartype 0.22.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,504 kB
  • sloc: python: 85,502; sh: 328; makefile: 30; javascript: 18
file content (25 lines) | stat: -rw-r--r-- 964 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3
# --------------------( LICENSE                            )--------------------
# Copyright (c) 2014-2025 Beartype authors.
# See "LICENSE" for further details.

'''
Project-wide **code object globals** (i.e., global constants describing code
objects of callables, classes, and modules).

This private submodule is *not* intended for importation by downstream callers.
'''

# ....................{ STRINGS                            }....................
FUNC_CODEOBJ_NAME_MODULE = '<module>'
'''
Arbitrary string constant unconditionally assigned to the ``co_name`` instance
variables of the code objects of all pure-Python modules (i.e., the top-most
lexical scope of each module in the current call stack).

This constant enables callers to reliably differentiate between code objects
encapsulating:

* Module scopes, whose ``co_name`` variable is this constant.
* Callable scopes, whose ``co_name`` variable is *not* this constant.
'''