Page 1 of 1

Warum frühe Importe zur Bevölkerung von sys.module

Posted: 17 Mar 2025, 02:03
by Anonymous
https://github.com/stripe/stripe-python ... _init__.py
# We must import the app_info module early to populate it into
# `sys.modules`; otherwise doing `import stripe.app_info` will end up
# importing that module, and not the global `AppInfo` name from below.
import stripe.app_info
from stripe._app_info import AppInfo as AppInfo
from stripe._version import VERSION as VERSION
< /code>
Was ist gemeint mit stripe.app_info muss früh importiert werden, um zu verhindern, dass Appinfo importiert wird? Appinfo befindet sich nicht einmal in Stripe.app_info, aber in stripe._app_info?>