1

In Python how to get list of class methods as they declared? inspect.getmembers and dir return alphabetic ordered list, but I need a list of methods in exact declaration order.

Kirill Titov
  • 2,060
  • 5
  • 21
  • 33
  • Possible duplication of [How to get a complete list of object's methods and attributes?](http://stackoverflow.com/questions/191010/how-to-get-a-complete-list-of-objects-methods-and-attributes) – Ahmet DAL Apr 18 '13 at 14:03
  • @Whispered That is in no way a duplicate. – interjay Apr 18 '13 at 14:07
  • It depends if the `__prepare__` method has been used to change the class's underyling storage from a `dict` to an `OrderedDict` or similar -- Otherwise, that's why test suites and such stick with a naming convention that can be sorted into a specific order by name etc.... Otherwise, you can't really do what you're asking if the object wasn't set up to be able to support it... – Jon Clements Apr 18 '13 at 14:17

0 Answers0