Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 23310

Catalin George Festila: Python 3.7.3 : Using attrgetter from operator python module.

$
0
0
Return a callable object that fetches attr from its operand. If more than one attribute is requested, returns a tuple of attributes. The attribute names can also contain dots. see documentation. The attrgetter operator works more or less similar to itemgetter, except that it looks up an attribute instead of an index. For example to test this operator we need to create a class to access the

Viewing all articles
Browse latest Browse all 23310

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>