Skip to content

Instantly share code, notes, and snippets.

@apua
Last active February 21, 2025 16:26
Show Gist options
  • Save apua/6e1caf52e3ee2fdb013b70dcb3209e06 to your computer and use it in GitHub Desktop.
Save apua/6e1caf52e3ee2fdb013b70dcb3209e06 to your computer and use it in GitHub Desktop.
File based inheritance
def get_stages():
return config
exec(__import__('pathlib').Path(__file__).with_name('base.py').read_text(), globals())
config = 'config'
if __name__ == '__main__':
assert get_stages() == config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment