piskvorky/gensim — pull request #125 by langmore (2013-10-04 22:06:52+00:00)
Title: Safe save

Previously, if you attempted to serialize a corpus to the path "`fname`" used to generate it, you would erase the file located at `fname`. Now, the serialization is aborted and an exception is raised. Alternatively an error could be logged...but this is a serious mishap (when it occurs) so I think an exception is the right thing to do.

### Changes to `corpora.indexedcorpus.py`
* Added check/exception-raise to `.serialize()`