How to list attributes in Mechanical CPython Console?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 470
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭
edited June 2023 in Structures

How to list attributes in Mechanical CPython Console?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 470
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    Answer ✓

    The conventional dir() doesn't print a list of all the attributes and functions of the object in the CPython Console. One has to explicitly use the the print command to print the returned list from dir()

    print(dir(attribute))