Files
RustPython/examples/package_embed.py
2022-06-16 01:07:26 +09:00

25 lines
310 B
Python

from dataclasses import dataclass
from typing import Any
__all__ = ["context"]
@dataclass
class Context:
name: str
something: Any
_context = Context(
name="test name",
something=None,
)
def context() -> Context:
return _context
if __name__ == "__main__":
print(context().name)