Python pickle.EMPTY_DICT() Examples

The following are code examples for showing how to use pickle.EMPTY_DICT(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: scrimmage-scoreboard   Author: ShySec   File: globals.py    GNU General Public License v2.0 5 votes vote down vote up
def save_dict(self, obj):
        self.write(EMPTY_DICT if self.bin else MARK + DICT)
        self.memoize(obj)
        self._batch_setitems([(key, obj[key]) for key in sorted(obj)]) 
Example 2
Project: addrest   Author: JBrVJxsc   File: globals.py    MIT License 5 votes vote down vote up
def save_dict(self, obj):
        self.write(EMPTY_DICT if self.bin else MARK + DICT)
        self.memoize(obj)
        self._batch_setitems([(key, obj[key]) for key in sorted(obj)])