Skip to content

Instantly share code, notes, and snippets.

View sosey's full-sized avatar

Megan Sosey sosey

View GitHub Profile
class ImageWidget:
def __init__(self, properties...): # all the properties below should be valid kwargs
"""
Minimal widget does *not* have any fancy initializer parsing. The user
has to call a `load` method. Future-proofing against future `load_*`
methods so that the initializer doesn't get too confusing.
"""
# OPTION 2 / stretch goal - I favor only option 1:
def __init__(self, image=None, properties...):
"""