cqlengine/cqlengine — pull request #133 by russellhaering (2013-12-02 16:18:28+00:00)
Title: Fix Token comparison

I believe this fixes #132.

A few concerns:

1. `Token` instances are actually mutated once they're passed to `filter`. Should a guard be added against re-use of tokens? Or some concept of a bound-function so that `Token` can be immutable?
2. There seem to be a few tests related to tokens that I don't _think_ should be passing prior to this branch, but I haven't gotten up a dev environment to see if they actually do.
3. Prior to this branch there were no guards against comparing a `Token` to any column that had `partition_key` set, or against comparing `'pk__token'` to a non-`Token` value. I don't immediately see a use case for either of those (and at least in most cases I don't think it would generate a valid query), but if there is one this branch needs some refactoring.