'Create a new gist.
If no login was provided, it will be anonymous.
:param str description: (required), description of gist
:param dict files: (required), file names with associated dictionaries
for content, e.g. ``{\'spam.txt\': {\'content\': \'File contents
:param bool public: (optional), make the gist public if True
:returns: :class:`Gist <github3.gists.Gist>`'

def create_gist(self, description, files, public=True):

    new_gist = {u'description': description, u'public': public, u'files': files}
    url = self._build_url(u'gists')
    json = self._json(self._post(url, data=new_gist), 201)
    return self._instance_or_null(Gist, json)
