pylint-bot / test

0 stars 0 forks source link

Add base classes (or mixins) for the type of nodes #133

Open pylint-bot opened 9 years ago

pylint-bot commented 9 years ago

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?)


We should add a couple of base classes (or mixins) in astroid for exporting the type of capabilites a node can have. For instance, Callable needs to implement infer_call_result, Iterable needs to implement itered. Sequence needs to implement getitem and so on. This would be extremely helpful when adding new nodes, especially when adding new objects such as objects.Super or objects.FrozenSet.