Module operator :: Class attrgetter
[hide private]
[frames] | no frames]

type attrgetter

object --+
         |
        attrgetter

attrgetter(attr, ...) --> attrgetter object

Return a callable object that fetches the given attribute(s) from its operand. After, f=attrgetter('name'), the call f(r) returns r.name. After, g=attrgetter('name', 'date'), the call g(r) returns (r.name, r.date).

Instance Methods [hide private]
 
__call__(x, ...)
x(...)
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
a new object with type S, a subtype of T
__new__(T, S, ...)
Method Details [hide private]

__getattribute__(...)

 

x.__getattribute__('name') <==> x.name

Overrides: object.__getattribute__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__