About 219,000 results
Open links in new tab
  1. the dir function in python - Stack Overflow

    Jan 25, 2013 · dir([object]) -> list of strings If called without an argument, return the names in the current scope. Else, return an alphabetized list of names comprising (some of) the attributes of the given …

  2. What does Python's dir () function stand for? - Stack Overflow

    Jun 28, 2014 · What does Python's dir () function stand for? [duplicate] Asked 14 years, 2 months ago Modified 11 years, 6 months ago Viewed 32k times

  3. Python dir () function with variable arguments - Stack Overflow

    Feb 18, 2017 · For fun/to practice python, I am trying to create a program that displays the contents of a module. Looks like this: import sys print "Here are all the functions in the sys module: " print dir(sys)

  4. python - What's the difference between dir () and __dir__ ... - Stack ...

    Jul 12, 2018 · 4 dir calls __dir__ method if it is present, from python documentation : dir ( [object])¶ Without arguments, return the list of names in the current local scope. With an argument, attempt to …

  5. Why is 'dir ()' named 'dir' in python? - Stack Overflow

    85 In Python there is a built-in function called dir. This is used to get a list of all the attributes for an object. I understand what it does, but I am confused about why it is called dir. How is this name …

  6. Order of results from python's dir() function - Stack Overflow

    Mar 11, 2012 · This is by definition of the dir() built-in. It explicitly alphabetizes the list of names: Help on built-in function dir in module __builtin__: dir(...) dir([object]) -> list of strings If called without an …

  7. Python - dir() - how can I differentiate between functions/method and ...

    Nov 8, 2014 · 13 dir() returns a list of all the defined names, but it is annoying to try to call function I see listed only to discover it is actually an attribute, or to try to access an attribute only to discover it is …

  8. python - dir () without built-in methods - Stack Overflow

    Feb 4, 2014 · "The only way to detect these is through string functions?" Yes, special methods are identical to regular methods, the double-underscore distinction is simply a convention. I use list …

  9. python - Importing files from different folder - Stack Overflow

    I have this folder structure: application ├── app │ └── folder │ └── file.py └── app2 └── some_folder └── some_file.py How can I import a function from file.py, from within som...

  10. python - What's is meant by the dir () built-in function returns ...

    Nov 17, 2020 · Python v. 3.9 @ macOS 10.15.7 Help on built-in function dir in module builtins: dir(...) dir([object]) -> list of strings If called without an argument, return the names in the current scope. …