データベースから返されるオブジェクトのグループの値を出力したいと考えています。
私は次のように試しました、
Products = productBll.listProduct(params)
print Products.__dict__
次のように表示されます。
{'_result_cache': [Product: Product object, Product: Product object]}
しかし、私がこのようにやっているとき、
for prd in Products:
print prd.__dict__
Products オブジェクトのすべてのコンテンツを表示しています
{'product_price': 0.0, 'right_side_min_depth': 0.0, 'short_description': u'', 'left_side_min_depth': 0.0, 'max_depth': 0.0, 'height_scale': 2.0, 'left_side_max_depth': 0.0, 'is_hinges': u'No', 'max_height': 1.04}
{'product_price': 0.0, 'right_side_min_depth': 0.0, 'short_description': u'', 'left_side_min_depth': 0.0, 'max_depth': 1000.0, 'height_scale': 1000.0, 'left_side_max_depth': 0.0, 'is_hinges': u'No', 'max_height': 1000.0}
しかし、for ループを使用せずに上記の結果が必要です。
1行のコードでそれを行う方法はありますか?