Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
function/method help
#4
(May-17-2020, 01:27 AM)myv5285 Wrote: But you said help(request.request)

How do I know it should be requests.requests

Because it's in the docstring for requests.get:
Quote: :param \*\*kwargs: Optional arguments that request takes.

Then, I looked at the source code, to confirm my understanding.


As I said - it's not always as simple as just using help() - it may be that function/method takes arbitarry arguments - e.g. *args, **kwargs, the docstring may be poorly written, etc. You may need to look at the source code or other resources like documentation (assuming it's not genereated from doc-strings), tutorials, etc.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
function/method help - by myv5285 - May-14-2020, 02:47 AM
RE: function/method help - by buran - May-14-2020, 04:48 AM
RE: function/method help - by myv5285 - May-17-2020, 01:27 AM
RE: function/method help - by buran - May-17-2020, 04:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  i want to use type= as a function/method keyword argument Skaperen 9 2,011 Nov-06-2022, 04:28 AM
Last Post: Skaperen
  Building a method name in a function ffgth 9 3,369 Oct-19-2020, 01:21 PM
Last Post: buran
  Accessing method as function object ClassicalSoul 2 2,075 Feb-14-2020, 09:31 PM
Last Post: wavic
  function vs method prateekshaw 2 2,246 Nov-14-2019, 07:00 PM
Last Post: DeaD_EyE
  I'm trying to figure out whether this is a method or function call 357mag 2 2,494 Jul-04-2019, 01:43 AM
Last Post: ichabod801
  function method problems drchar 2 2,979 Dec-11-2018, 02:38 PM
Last Post: buran
  Understanding Method/Function robdhunter 2 2,696 Mar-10-2018, 11:57 PM
Last Post: robdhunter
  How to pass value from method to function iFunKtion 11 8,900 May-23-2017, 05:06 PM
Last Post: iFunKtion
  init vs_init_ while defining method/function? hsunteik 1 3,685 Dec-24-2016, 08:27 AM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020