1

I managed to get Show Completion to work thanks to this answer. But what does str(object) -> string mean as a tip after typing the opening bracket of a function?

Example code:

linkText = "some text"
elms = browser.find_elements(By.PARTIAL_LINK_TEXT(linkText))

On Run gives: TypeError: 'str' object is not callable Does it mean linkText should be a pointer to string? How do I enter a pointer in Python?

Community
  • 1
  • 1
  • 1
    Python doesn't have pointers. What is `By`? Why do you expect something called `PARTIAL_LINK_TEXT` to be a function? – Wooble Feb 11 '13 at 15:38
  • What you see is after typeing `name(` is a 'Call tip', which tries to give the signature and the first line of the docstring. For many builtin functions, what you see are the first lines of the docstring, which give call signature and, after '->', the function return value. `str(x)` returns a string. – Terry Jan Reedy Nov 06 '14 at 04:53
  • Your example code is a different issue. The exception means that `By.PARTIAL_LINK_TEXT` is what its name says, a string, and not a function. – Terry Jan Reedy Nov 06 '14 at 04:56

1 Answers1

0

To repeat my comments, which were really answers.

What you see is after typing "name(" is a 'Call tip', which tries to give the signature and the first line of the docstring. For many built-in functions, what you see are the first lines of the docstring, which give call signature and the function return value after '->'. str(x) returns a string.

Your example code is a different issue. The exception means that By.PARTIAL_LINK_TEXT is what its name says, a string, and not a function.

illright
  • 3,991
  • 2
  • 29
  • 54
Terry Jan Reedy
  • 18,414
  • 3
  • 40
  • 52