inoi/trombi — Issue #34: Change Database.set() signature
Author: mikek
Created: 2011-11-25 12:01:22+00:00
State: open

`set([doc_id], data, callback[, attachments=None])` has a really strange signature. It is the only method in trombi, which has first optional positional argument. Arguments parsing is manual (which can be then simplified). The real reason to change it, however, is inability to pass *callback* keyword argument. This does not allow to use [tornado.gen](http://www.tornadoweb.org/documentation/gen.html) to simplify asynchronous code.
I guess it can't be handled without changing method's signature and breaking existing code. At least the first argument would become required: `set(doc_id, data, callback[, attachments=None])`.
Please, let me know if there is a clean way to get around this particular issue.