top | item 34755707

(no title)

mgsk | 3 years ago

What does this add this isn't already right there in the documentation?

discuss

order

Jtsummers|3 years ago

It draws attention to a problem that a lot of people have created for themselves by not reading the documentation (or not recalling it if they read it). I guess the author could have just linked the documentation but then they couldn't have added the additional context of the github search demonstrating how common it is.

newaccount74|3 years ago

I must have looked through the docs for create_task a dozen times while trying to figure out how async/await works in Python but still managed to overlook this part.

klyrs|3 years ago

The author doesn't go into much detail on that point: this warning should be present in documentation of many Python libraries that use create_task and return the result to the user unless that library stores those tasks in a collection as is recommended -- at which point the library author had better roll their own garbage collection!

nkrisc|3 years ago

If there was nothing to add then there wouldn’t be loads of projects on GitHub making exactly this mistake.