Re: Any equivalent to python's dir(object) in D?

2014-05-05 Thread bearophile via Digitalmars-d-learn
Chris Piker: Is there any way to get a list of the properties and functions provided by a module or class or generic variable in D at runtime? In D there are various traits to do that a compile-time. Like: http://dlang.org/traits.html#allMembers There are also the Phobos traits: http://dlang

Any equivalent to python's dir(object) in D?

2014-05-04 Thread Chris Piker via Digitalmars-d-learn
Is there any way to get a list of the properties and functions provided by a module or class or generic variable in D at runtime? I've grown quite accustomed to doing the following kinds of exploration in Python. With in the python interperter I can issue: a = some_barely_understood_functio