[issue40276] Make member objects inspectable.

2020-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Good point. I'll withdraw this. -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue40276] Make member objects inspectable.

2020-04-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: What should this return? >>> class A: ... __slots__ = ['x', 'y', 'z'] ... >>> class B(A): ... __slots__ = ['g','i'] ... >>> B.x.offset -- nosy: +pablogsal ___ Python tracker

[issue40276] Make member objects inspectable.

2020-04-13 Thread Raymond Hettinger
New submission from Raymond Hettinger : Given: class A: __slots__ = ['x', 'y', 'z') mo = vars(A)['x'] The field number should be viewable: >>> mo.offset 0 And the __repr__ should be: >>> mo -- components: Interpreter Core keywords: easy (C) message