Existing documentation URL(s)
In this section, the scheduled method takes 4 positional arguments. However, in reality, env and ctx are both None, and other doc (although this is for fetch) suggested that I should access the context and environment variables via self.ctx and self.env, which does work.
What changes are you suggesting?
I believe this example needs to be modified, including the section below where it generally describes what each arguments are. However, they are written in a manner that is programming language agnostic, so there needs to be clarification for the pythons case that those values are available under self and not positional arguments.
I think example could be something similar to this example in cloudflare/python-worker-examples repo
However, this example is faulty as scheduled still receiving four positional arguments, which I wonder if it is bug.
Additional information
If I run the given example in the cloudflare/python-worker-examples repo, it would throw this error saying wrong number of arguments.
if you run a code that is similar to the code block I raised a ticket about, both ctx and env are None
from workers import WorkerEntrypoint
class Default(WorkerEntrypoint):
async def scheduled(self, controller, env, ctx):
print(env, ctx)
The above code yields the below

Existing documentation URL(s)
In this section, the
scheduledmethod takes 4 positional arguments. However, in reality,envandctxare both None, and other doc (although this is for fetch) suggested that I should access the context and environment variables viaself.ctxandself.env, which does work.What changes are you suggesting?
I believe this example needs to be modified, including the section below where it generally describes what each arguments are. However, they are written in a manner that is programming language agnostic, so there needs to be clarification for the pythons case that those values are available under
selfand not positional arguments.I think example could be something similar to this example in cloudflare/python-worker-examples repo
However, this example is faulty as scheduled still receiving four positional arguments, which I wonder if it is bug.
Additional information
If I run the given example in the cloudflare/python-worker-examples repo, it would throw this error saying wrong number of arguments.
if you run a code that is similar to the code block I raised a ticket about, both
ctxandenvareNoneThe above code yields the below