unkn = getattr(bottle, 'capacity', None) if callable(unkn): print unkn()