Skip to content

implement __getattr__ on Group #202

Closed

Description

@gdementen

(forward the call to .eval().__getattr__)

This would, for example, make the following work:

>>> a = Axis('a', ['a1:a2', 'a0:a1'])
>>> a
Axis('a', ['a1:a2', 'a0:a1'])
>>> a.i[0].split(':')
AttributeError                            Traceback (most recent call last)
...
AttributeError: 'PGroup' object has no attribute 'split'
>>> # currently, we have to use .eval() explicitly
>>> a.i[0].eval().split(':')
['a1', 'a2']

Activity

  1. self-assigned this
    on Apr 11, 2017
  2. added 3 commits that reference this issue on Apr 11, 2017
    5f820f6
    5536790
    fc8e0ce
  3. modified the milestone: 0.22 on Apr 11, 2017
  4. added a commit that references this issue on Aug 31, 2018
    71cca13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions