Created
April 28, 2015 14:20
-
-
Save Lucretiel/12d20d9e89ba69d2366d to your computer and use it in GitHub Desktop.
A simple helper for populating __all__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def exporter(all): | |
def export(thing): | |
all.append(thing.__name__) | |
return thing | |
return export | |
################################### | |
__all__ = [] | |
export = exporter(__all__) | |
@export | |
def foo(): | |
pass | |
@export | |
class Foo: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment