operator: Add, with attrgetter() implementation.

pull/26/head
Paul Sokolovsky 2015-05-10 01:53:31 +03:00
rodzic c8b084915e
commit 7b7e937602
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,5 @@
def attrgetter(attr):
assert "." not in attr
def _attrgetter(obj):
return getattr(obj, attr)
return _attrgetter