Code review comment for lp://qastaging/~mandel/desktopcouch/record_id

Revision history for this message
Chad Miller (cmiller) wrote :

Let's not use "warnings" module. Instead, import logging and "logging.warn(...)", usually.

In this case, though, I would be just as happy with an assertion.

if '_id' in data:
   if record_id is not None:
       assert data['_id'] == record_id
       ...

Maybe drop the "record_id" member and make record_id a @property like record_type. Maybe we can drop all "_id" from code except for the getter.

Do we need a setter property also?

review: Needs Fixing

« Back to merge proposal