wonderwordsmodule icon indicating copy to clipboard operation
wonderwordsmodule copied to clipboard

sentence() missing 1 required positional argument: 'self'

Open siggib007 opened this issue 2 years ago • 1 comments

Describe the bug According to the documentation on readthedocs there are three classess in the wonderwords.RandomSentence class:

  • bare_bone_sentence
  • simple_sentence
  • sentence

To execute any of them you are simply supposed to call them with empty () like so s.sentence() That however produces an error Traceback (most recent call last): File "", line 1, in TypeError: sentence() missing 1 required positional argument: 'self'

To Reproduce Steps to reproduce the behavior:

  1. enter python interactive shell
  2. import wonderwords
  3. s=wonderwords.RandomSentence
  4. s.sentence()
  5. See error

Expected behavior Printout of a random sentence.

Desktop (please complete the following information):

  • OS: Windows 11
  • cmd.exe
  • Python 3.7.2

siggib007 avatar May 19 '23 21:05 siggib007

if you do s = wonderwords.RandomSentence() it will work you have to create an instance of the class I couldn't find an example which effects the application so if you provide context with this issiue which effects the application I can check

SerhatKaraman0 avatar Aug 24 '23 10:08 SerhatKaraman0

Yep!

mrmaxguns avatar Apr 09 '24 16:04 mrmaxguns