diff options
| author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-04-18 21:22:10 +0300 |
|---|---|---|
| committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-04-18 21:22:10 +0300 |
| commit | 4149d34d1c7535a73b7308a7fa653d0359cd3169 (patch) | |
| tree | 1d01e42ba1be43f6c92fe1ee735e1cc806f407d3 /ChangeLog | |
| parent | 4e747b1b029bc003984d5425f9c15389b7d0e17f (diff) | |
| download | astroid-git-4149d34d1c7535a73b7308a7fa653d0359cd3169.tar.gz | |
Class.local_attr and Class.local_attr_ancestors uses internally a mro lookup, using .mro() method, if they can.
That means for newstyle classes, when trying to lookup a member
using one of these functions, the first one according to the
mro will be returned. This reflects nicely the reality,
but it can have as a drawback the fact that it is a behaviour
change (the previous behaviour was incorrect though). Also,
having bases which can return multiple values when inferred
will not work with the new approach, because .mro() only
retrieves the first value inferred from a base.
--HG--
branch : 1.4.0
Diffstat (limited to 'ChangeLog')
| -rw-r--r-- | ChangeLog | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -43,6 +43,18 @@ Change log for the astroid package (used to be astng) .mro() fallbacks to using .ancestors() in that case. + * Class.local_attr and Class.local_attr_ancestors uses internally + a mro lookup, using .mro() method, if they can. + + That means for newstyle classes, when trying to lookup a member + using one of these functions, the first one according to the + mro will be returned. This reflects nicely the reality, + but it can have as a drawback the fact that it is a behaviour + change (the previous behaviour was incorrect though). Also, + having bases which can return multiple values when inferred + will not work with the new approach, because .mro() only + retrieves the first value inferred from a base. + 2015-08-02 -- 1.3.8 |
