just in the same file, before you declare the class.

or, i suppose, it would be cleaner to define inside __init__, as self.CHPROPS , then refer to it as such in inside did_discover_characteristics.

The purpose of that is to give a more meaningful display of characateristic properties -- but you could always just print c.properties, and figure out the bitmask yourself.