GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Home Home
Chris Griffith edited this page
Box is designed to be an easy drop in transparently replacements for dictionaries that adds dot notation access and a load of other features! my_box = Box(funny_movie='Hudson Hawk', best_movie='Kung Fu Panda') my_box.funny_movie # 'Hudson Hawk' By default, aka when my_box["good tv series"] = "I Dream of Jeannie" my_box["amazing tv series"] = "Avatar: The Last Airbender" my_box.good_tv_series # 'I Dream of Jeannie' It's also super easy to convert boxes to and from markup languages such as my_box.to_json(filename="films.json") new_box = Box.from_json(filename="films.json") new_box.keys() # dict_keys(['funny_movie', 'weird_movie', 'best_movie', # 'good tv series', 'amazing tv series']) Any sub dictionaries or ones set after initiation will be automatically converted to a Box object. You can always run big_box = Box({"boxes": {"the": {"whole": {"way": {"down": "yup"}}}}}) big_box.boxes.the.whole.way.down # 'yup' These documents are for Box 5.0+ |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |